diff --git a/src/gui-sdl/gui-sdl.c b/src/gui-sdl/gui-sdl.c index 78c05d7..425e386 100644 --- a/src/gui-sdl/gui-sdl.c +++ b/src/gui-sdl/gui-sdl.c @@ -1462,6 +1462,8 @@ static void input_options(int joy) virtualkey = virtkbd_get_key(); if (virtualkey == NULL) return; + if (virtualkey->ev_name == NULL) + return; key = virtualkey->ev_name; switch(opt) @@ -1507,6 +1509,7 @@ static void virtual_keyboard(void) virtkey_t *key =virtkbd_get_key(); if (key) {key_code = key->sdl_code;} else return; + if (!key_code) return; SDL_Event event_key; diff --git a/src/jd-sdl/joystick.c b/src/jd-sdl/joystick.c index 33cb6a1..bba7add 100644 --- a/src/jd-sdl/joystick.c +++ b/src/jd-sdl/joystick.c @@ -125,11 +125,8 @@ static void read_joy (unsigned int nr) int bs = SDL_JoystickGetButton (joy, i) ? 1 : 0; setjoybuttonstate (nr, i, bs); #ifdef GEKKO - if (!gui_is_active) - { - if ((nr==0) && (currprefs.rumble[0])) Rumble (0,i, bs); - if ((nr==1) && (currprefs.rumble[1])) Rumble (1,i, bs); - } + if ((nr==0) && (currprefs.rumble[0])) Rumble (0,i, bs); + if ((nr==1) && (currprefs.rumble[1])) Rumble (1,i, bs); #endif } }