Reworked H key handling into switch statement
This commit is contained in:
parent
8d14b4bbc6
commit
b62a543679
14
src/uxnemu.c
14
src/uxnemu.c
|
@ -187,14 +187,18 @@ void
|
||||||
doctrl(Uxn *u, SDL_Event *event, int z)
|
doctrl(Uxn *u, SDL_Event *event, int z)
|
||||||
{
|
{
|
||||||
Uint8 flag = 0x00;
|
Uint8 flag = 0x00;
|
||||||
if(z && event->key.keysym.sym == SDLK_h) {
|
if(z && event->key.keysym.sym == SDLK_h)
|
||||||
if(SDL_GetModState() & KMOD_CAPS)
|
switch(SDL_GetModState() & (KMOD_LSHIFT | KMOD_LCTRL | KMOD_LALT)) {
|
||||||
|
case KMOD_LSHIFT | KMOD_LCTRL:
|
||||||
screencapture();
|
screencapture();
|
||||||
else if(SDL_GetModState() & KMOD_LCTRL)
|
break;
|
||||||
|
case KMOD_LCTRL:
|
||||||
toggledebug(u);
|
toggledebug(u);
|
||||||
else if(SDL_GetModState() & KMOD_LALT)
|
break;
|
||||||
|
case KMOD_LALT:
|
||||||
togglezoom(u);
|
togglezoom(u);
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
switch(event->key.keysym.sym) {
|
switch(event->key.keysym.sym) {
|
||||||
case SDLK_LCTRL: flag = 0x01; break;
|
case SDLK_LCTRL: flag = 0x01; break;
|
||||||
case SDLK_LALT: flag = 0x02; break;
|
case SDLK_LALT: flag = 0x02; break;
|
||||||
|
|
Loading…
Reference in New Issue