mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-21 12:29:43 -10:00
A driver that needed a setting took all of them and picked the field out: if (config_get_ptr()->uints.input_mouse_index[port] == 0) wr->nowinkey = config_get_ptr()->bools.input_nowinkey_enable; Thirteen named calls on the frontend answer instead, each for one setting or one question: if (input_config_get_mouse_index(port) == 0) wr->nowinkey = input_config_get_nowinkey_enable(); They join the input_config_get_...() calls that were there. What the drivers depend on is that list; the layout of the settings is the frontend's business. Each call sits under the condition its setting has, and answers with the default before the settings are loaded, which is what the drivers' own checks for that did. Twenty-eight reads are converted, in thirteen files: the mouse index in the SDL 1.2, SDL2, SDL3, DirectInput and X11 input drivers; the Windows key, background keyboard, overlay and joypad driver in the raw input and DirectInput drivers; XInput and Player Lights in the raw input joypad driver; the rumble gain in the udev, SDL3 and Dingux joypad drivers; the profile directory and system keyboard for SDL3; the keyboard layout for xkb; the test drivers' scripts. The samples that link a driver without the frontend get the calls from one shared header, samples/input/input_config_stubs.h, which reads their own settings. Left, in tools/input_state_grab_check.py: 35 in 12 files - Android, Apple, the consoles, udev's touch options, the replay code, and the SDL2 input driver taking the video driver's window. Built for Linux, Windows and Android; the bridge, udev, X11 and raw input tests and the frontend harness pass.