Expanded the range of gamepad keycodes to be consistent with SDL
Recently I was testing another PR (#95486). Although some devices use the mapping scheme in `core/input/gamecontrollerdb.txt`, the mapping of some keys still fails. By using `evemu-record` to test the buttons, it is found that the key codes of some buttons are not in the range of Godot test. Comparing the SDL code, it is found that the test ranges of the two are inconsistent. This may be the reason why some devices cannot work properly in Godot.
This commit is contained in:
parent
568589c9d8
commit
8ef2c3d367
@ -309,7 +309,7 @@ void JoypadLinux::setup_joypad_properties(Joypad &p_joypad) {
|
||||
p_joypad.key_map[i] = num_buttons++;
|
||||
}
|
||||
}
|
||||
for (int i = BTN_MISC; i < BTN_JOYSTICK; ++i) {
|
||||
for (int i = 0; i < BTN_JOYSTICK; ++i) {
|
||||
if (test_bit(i, keybit)) {
|
||||
p_joypad.key_map[i] = num_buttons++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user