0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-28 00:33:02 +00:00

Reworked H key handling into switch statement

This commit is contained in:
Andrew Alderwick 2021-06-18 09:01:35 +01:00
parent 8d14b4bbc6
commit b62a543679

View file

@ -187,13 +187,17 @@ void
doctrl(Uxn *u, SDL_Event *event, int z)
{
Uint8 flag = 0x00;
if(z && event->key.keysym.sym == SDLK_h) {
if(SDL_GetModState() & KMOD_CAPS)
if(z && event->key.keysym.sym == SDLK_h)
switch(SDL_GetModState() & (KMOD_LSHIFT | KMOD_LCTRL | KMOD_LALT)) {
case KMOD_LSHIFT | KMOD_LCTRL:
screencapture();
else if(SDL_GetModState() & KMOD_LCTRL)
break;
case KMOD_LCTRL:
toggledebug(u);
else if(SDL_GetModState() & KMOD_LALT)
break;
case KMOD_LALT:
togglezoom(u);
break;
}
switch(event->key.keysym.sym) {
case SDLK_LCTRL: flag = 0x01; break;