Merge pull request #12297 from Szunti/sdl_input_crash_if_analog_bound

This commit is contained in:
Autechre 2021-04-22 03:25:32 +02:00 committed by GitHub
commit d458729f6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,14 +142,12 @@ static int16_t sdl_input_state(
if (id_plus_valid && id_plus_key < RETROK_LAST)
{
unsigned sym = rarch_keysym_lut[(enum retro_key)id_plus_key];
if (sdl_key_pressed(sym))
if (sdl_key_pressed(id_plus_key))
ret = 0x7fff;
}
if (id_minus_valid && id_minus_key < RETROK_LAST)
{
unsigned sym = rarch_keysym_lut[(enum retro_key)id_minus_key];
if (sdl_key_pressed(sym))
if (sdl_key_pressed(id_minus_key))
ret += -0x7fff;
}