mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
(input device ID) Should no longer crash when pressing left on
this entry when no devices are connected
This commit is contained in:
parent
175672dedc
commit
9bdb6291b0
@ -1319,13 +1319,13 @@ static int setting_action_right_libretro_device_type(
|
||||
|
||||
static int setting_action_left_bind_device(void *data, bool wraparound)
|
||||
{
|
||||
unsigned index_offset;
|
||||
unsigned *p = NULL;
|
||||
unsigned max_devices = input_config_get_device_count();
|
||||
unsigned index_offset = 0;
|
||||
unsigned max_devices = input_config_get_device_count();
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!setting)
|
||||
if (!setting || max_devices == 0)
|
||||
return -1;
|
||||
|
||||
index_offset = setting->index_offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user