[libmanette] mapping: Don't parse the first two fields as bindings
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libmanette] mapping: Don't parse the first two fields as bindings
- Date: Sun, 22 Nov 2020 08:23:17 +0000 (UTC)
commit f580163b93c50ed112bb0dc736abbea301098a13
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sat Nov 21 09:30:11 2020 +0100
mapping: Don't parse the first two fields as bindings
Thanks to changes introduced by the previous commit, the mapping object
can always expect to be fed a complete mapping string, with he first
field being the GUID and the second one being the gamepad's name.
These two first fields must hence be skipped.
src/manette-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/manette-mapping.c b/src/manette-mapping.c
index 5d9d7d2..9f45443 100644
--- a/src/manette-mapping.c
+++ b/src/manette-mapping.c
@@ -427,7 +427,7 @@ set_from_mapping_string (ManetteMapping *self,
mappings = g_strsplit (mapping_string, ",", 0);
mappings_length = g_strv_length (mappings);
- for (i = 0; i < mappings_length; i++) {
+ for (i = 2; i < mappings_length; i++) {
splitted_mapping = g_strsplit (mappings[i], ":", 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]