libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.34k stars 1.84k forks source link

[Bug][Input] udev - user provided input_enable_hotkey_btn code not respected in RA. #17065

Closed Langerz82 closed 1 month ago

Langerz82 commented 1 month ago

First and foremost consider this:

Description

When using udev input configurations for game controllers the hotkey button code does not assign to the input settings.

This record value is not respected:

input_enable_hotkey_btn = "10"

Here is the input config file "Zikway HID gamepad.cfg":

input_device = "Zikway HID gamepad"
input_driver = "udev"
input_vendor_id = "13623"
input_product_id = "4161"
input_r_y_plus_axis = "+3"
input_left_btn = "h0left"
input_state_slot_decrease_btn = "h0left"
input_r_x_minus_axis = "-2"
input_right_btn = "h0right"
input_state_slot_increase_btn = "h0right"
input_r_btn = "7"
input_save_state_btn = "7"
input_down_btn = "h0down"
input_volume_down_btn = "h0down"
input_r_y_minus_axis = "-3"
input_l_btn = "6"
input_load_state_btn = "6"
input_r_x_plus_axis = "+2"
input_y_btn = "3"
input_x_btn = "4"
input_menu_toggle_btn = "4"
input_b_btn = "0"
input_reset_btn = "0"
input_a_btn = "1"
input_up_btn = "h0up"
input_volume_up_btn = "h0up"
input_select_btn = "10"
input_l3_btn = "13"
input_start_btn = "11"
input_exit_emulator_btn = "11"
input_l_x_plus_axis = "+0"
input_l_y_minus_axis = "-1"
input_enable_hotkey_btn = "10"
input_l2_axis = "+5"
input_rewind_axis = "+5"
input_r2_axis = "+4"
input_toggle_fast_forward_axis = "+4"
input_l_y_plus_axis = "+1"
input_r3_btn = "14"
input_fps_toggle_btn = "14"
input_l_x_minus_axis = "-0"

Oh and just thought I should mention, you can manually set the hotkey in the menu, but the problem is if you change controller with a different hotkey keycode you have to change it again in the menu, despite it being supplied via the uved input config file.

Expected behavior

Hotkey buttons assigned in the config file should take precedence and recognise the overriding value.

Actual behavior

input_enable_hotkey_btn value is not being recognised and set in retroarch.

Steps to reproduce the bug

Use a udev controller type with the input_enable_hotkey_btn set different from the retroarch.cfg setting and it will not respect the different value.

Bisect Results

I think this has been an on-going issue.

Version/Commit

commit: 1e1b24c35996436e6cf0fe50ec046e2e03a0dbfa https://github.com/libretro/RetroArch/commit/1e1b24c35996436e6cf0fe50ec046e2e03a0dbfa

Environment information

EmuELEC 4.8 TEST Compiled with Ubuntu 22.04.4 LTS

hizzlekizzle commented 1 month ago

so the other hotkeys work in the autoconfig, just not the hotkey enabler?

Langerz82 commented 1 month ago

Hello, all the other input record entries work fine, its just the hotkey one that's the issue.

Langerz82 commented 1 month ago

Upon further testing I found out if I set in retroarch:

input_enable_hotkey_btn = "nul"

the input_enable_hotkey_btn from the config does indeed take precendent and works fine. I think the issue is more with our build setting a default value in retroarch.cfg hence why it ignores our submitted input gamepad values.

This issue can be closed, it doesn't really need any fix. Sorry for the uneeded report. Keep up the great work!!! ^-^