diff --git a/.vscode/launch.json b/.vscode/launch.json index 4880045ed9..e7552247cc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,26 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/retroarch.exe", + "args": ["-v"], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, { "name": "(gdb) Attach", "type": "cppdbg", diff --git a/input/input_driver.c b/input/input_driver.c index 94f6a009eb..defdd62c2d 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -1132,8 +1132,6 @@ void input_get_state_for_port(void *data, unsigned port, retro_bits_t* p_new_sta unsigned i; rarch_joypad_info_t joypad_info; settings_t *settings = (settings_t*)data; - const struct retro_keybind *binds = input_config_binds[port]; - BIT256_CLEAR_ALL_PTR(p_new_state); joypad_info.joy_idx = settings->uints.input_joypad_map[port]; @@ -1144,11 +1142,8 @@ void input_get_state_for_port(void *data, unsigned port, retro_bits_t* p_new_sta { bool bit_pressed = false; - if (input_driver_input_state(joypad_info, &binds, port, RETRO_DEVICE_JOYPAD, 0, i) == 1) - { - RARCH_LOG("button pressed port: %d id: %d\n", port, i); + if (input_driver_input_state(joypad_info, libretro_input_binds, port, RETRO_DEVICE_JOYPAD, 0, i) != 0) bit_pressed = true; - } if (bit_pressed) BIT256_SET_PTR(p_new_state, i); diff --git a/input/input_mapper.c b/input/input_mapper.c index e7853d5141..3239cf5600 100644 --- a/input/input_mapper.c +++ b/input/input_mapper.c @@ -104,11 +104,10 @@ void input_mapper_poll(input_mapper_t *handle) memset(handle->keys, 0, sizeof(handle->keys)); - for (i = 0; i < 2; i++) + for (i = 0; i < max_users; i++) { device = settings->uints.input_libretro_device[i]; device &= RETRO_DEVICE_MASK; - if (device == RETRO_DEVICE_KEYBOARD) { for (j = 0; j < RARCH_CUSTOM_BIND_LIST_END; j++)