Fixed a bug in the virtual keyboard and removed a useless check

This commit is contained in:
fabio.olimpieri 2015-01-04 18:40:33 +00:00
parent aa1bb0055c
commit bf65a989fe
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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);
}
#endif
}
}