mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Pass settings struct around
This commit is contained in:
parent
558cb64438
commit
d9c5013d42
@ -662,6 +662,7 @@ static bool input_driver_toggle_button_combo(
|
||||
* Returns: Input sample containg a mask of all pressed keys.
|
||||
*/
|
||||
uint64_t input_menu_keys_pressed(
|
||||
void *data,
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
@ -675,13 +676,13 @@ uint64_t input_menu_keys_pressed(
|
||||
unsigned i;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
||||
settings_t *settings = config_get_ptr();
|
||||
settings_t *settings = (settings_t*)data;
|
||||
const struct retro_keybind *binds_norm = NULL;
|
||||
const struct retro_keybind *binds_auto = NULL;
|
||||
unsigned max_users = settings->uints.input_max_users;
|
||||
|
||||
if (settings->bools.menu_unified_controls && !menu_input_dialog_get_display_kb())
|
||||
return input_keys_pressed(old_input, last_input,
|
||||
return input_keys_pressed(settings, old_input, last_input,
|
||||
trigger_input, runloop_paused, nonblock_state);
|
||||
|
||||
for (i = 0; i < max_users; i++)
|
||||
@ -896,6 +897,7 @@ static INLINE bool input_keys_pressed_internal(
|
||||
* Returns: Input sample containg a mask of all pressed keys.
|
||||
*/
|
||||
uint64_t input_keys_pressed(
|
||||
void *data,
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
@ -905,7 +907,7 @@ uint64_t input_keys_pressed(
|
||||
unsigned i;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
uint64_t ret = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
settings_t *settings = (settings_t*)data;
|
||||
const struct retro_keybind *binds = input_config_binds[0];
|
||||
const struct retro_keybind *binds_auto = &input_autoconf_binds[0][RARCH_ENABLE_HOTKEY];
|
||||
const struct retro_keybind *binds_norm = &binds[RARCH_ENABLE_HOTKEY];
|
||||
|
@ -257,6 +257,7 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
unsigned idx, unsigned id);
|
||||
|
||||
uint64_t input_keys_pressed(
|
||||
void *data,
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
@ -265,6 +266,7 @@ uint64_t input_keys_pressed(
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
uint64_t input_menu_keys_pressed(
|
||||
void *data,
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
|
@ -1068,11 +1068,11 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_is_alive ?
|
||||
input_menu_keys_pressed(old_input,
|
||||
input_menu_keys_pressed(settings, old_input,
|
||||
&last_input, &trigger_input, runloop_paused,
|
||||
&input_driver_is_nonblock) :
|
||||
#endif
|
||||
input_keys_pressed(old_input, &last_input,
|
||||
input_keys_pressed(settings, old_input, &last_input,
|
||||
&trigger_input, runloop_paused,
|
||||
&input_driver_is_nonblock);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user