Backport this - https://github.com/jsonn/pkgsrc/commit/9d0d89dbc3ab94147676f296c61f97...
[pcsx_rearmed.git] / frontend / menu.c
index 0088a63..4fd0b56 100644 (file)
@@ -308,12 +308,12 @@ static void menu_sync_config(void)
 
        switch (in_type_sel1) {
        case 1:  in_type1 = PSE_PAD_TYPE_ANALOGPAD; break;
-       case 2:  in_type1 = PSE_PAD_TYPE_GUNCON;    break;
+       case 2:  in_type1 = PSE_PAD_TYPE_NEGCON;    break;
        default: in_type1 = PSE_PAD_TYPE_STANDARD;
        }
        switch (in_type_sel2) {
        case 1:  in_type2 = PSE_PAD_TYPE_ANALOGPAD; break;
-       case 2:  in_type2 = PSE_PAD_TYPE_GUNCON;    break;
+       case 2:  in_type2 = PSE_PAD_TYPE_NEGCON;    break;
        default: in_type2 = PSE_PAD_TYPE_STANDARD;
        }
        if (in_evdev_allow_abs_only != allow_abs_only_old) {
@@ -903,8 +903,6 @@ static void get_line(char *d, size_t size, const char *s)
                len = size - 1;
        strncpy(d, s, len);
        d[len] = 0;
-
-       mystrip(d);
 }
 
 static void keys_write_all(FILE *f)
@@ -1011,7 +1009,10 @@ static void keys_load_all(const char *cfg)
        while (p != NULL && (p = strstr(p, "binddev = ")) != NULL) {
                p += 10;
 
+               // don't strip 'dev' because there are weird devices
+               // with names with space at the end
                get_line(dev, sizeof(dev), p);
+
                dev_id = in_config_parse_dev(dev);
                if (dev_id < 0) {
                        printf("input: can't handle dev: %s\n", dev);