SDL: fixed alt/shift modifiers for sdl 1.2 and 1.3
This commit is contained in:
parent
f31989c8fa
commit
c6dca72ba9
|
@ -399,6 +399,7 @@ static void
|
||||||
KeyboardCommands()
|
KeyboardCommands()
|
||||||
{
|
{
|
||||||
int is_shift, is_alt;
|
int is_shift, is_alt;
|
||||||
|
SDLMod mod;
|
||||||
|
|
||||||
char* movie_fname = "";
|
char* movie_fname = "";
|
||||||
// get the keyboard input
|
// get the keyboard input
|
||||||
|
@ -420,11 +421,17 @@ KeyboardCommands()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//is_shift = KEY(LEFTSHIFT) | KEY(RIGHTSHIFT);
|
mod = SDL_GetModState();
|
||||||
//is_alt = KEY(LEFTALT) | KEY(RIGHTALT);
|
if(mod | KMOD_LSHIFT || mod | KMOD_RSHIFT)
|
||||||
is_shift = 0;
|
is_shift = 1;
|
||||||
is_alt = 0;
|
else
|
||||||
|
is_shift = 0;
|
||||||
|
if(mod | KMOD_LALT || mod | KMOD_RALT)
|
||||||
|
is_alt = 1;
|
||||||
|
else
|
||||||
|
is_alt = 0;
|
||||||
|
|
||||||
|
|
||||||
if(_keyonly(renderBgKey)) {
|
if(_keyonly(renderBgKey)) {
|
||||||
if(is_shift) {
|
if(is_shift) {
|
||||||
|
@ -652,9 +659,10 @@ KeyboardCommands()
|
||||||
if(keyonly(H)) FCEUI_NTSCSELHUE();
|
if(keyonly(H)) FCEUI_NTSCSELHUE();
|
||||||
if(keyonly(T)) FCEUI_NTSCSELTINT();
|
if(keyonly(T)) FCEUI_NTSCSELTINT();
|
||||||
|
|
||||||
// TEMPORAILY DISABLED! DO NOT COMMIT! TODO!
|
|
||||||
#if SDL_VERSION_ATLEAST(1,3,0)
|
|
||||||
|
|
||||||
|
|
||||||
|
#if SDL_VERSION_ATLEAST(1,3,0)
|
||||||
|
// TODO: clean this shit up and make it work for 1.3
|
||||||
#else
|
#else
|
||||||
if(KEY(KP_MINUS) || KEY(MINUS)) FCEUI_NTSCDEC();
|
if(KEY(KP_MINUS) || KEY(MINUS)) FCEUI_NTSCDEC();
|
||||||
if(KEY(KP_PLUS) || KEY(EQUAL)) FCEUI_NTSCINC();
|
if(KEY(KP_PLUS) || KEY(EQUAL)) FCEUI_NTSCINC();
|
||||||
|
|
Loading…
Reference in New Issue