Switch case for fkey handler
This commit is contained in:
parent
aaa70e12eb
commit
0ac9f19974
14
src/uxn11.c
14
src/uxn11.c
|
@ -146,14 +146,12 @@ emu_event(Uxn *u)
|
||||||
KeySym sym;
|
KeySym sym;
|
||||||
char buf[7];
|
char buf[7];
|
||||||
XLookupString((XKeyPressedEvent *)&ev, buf, 7, &sym, 0);
|
XLookupString((XKeyPressedEvent *)&ev, buf, 7, &sym, 0);
|
||||||
if(sym == XK_F1)
|
switch(sym){
|
||||||
toggle_scale();
|
case XK_F1: toggle_scale(); break;
|
||||||
else if(sym == XK_F2)
|
case XK_F2: u->dev[0x0e] = !u->dev[0x0e]; break;
|
||||||
u->dev[0x0e] = !u->dev[0x0e];
|
case XK_F4: emu_restart(u, boot_rom, 0); break;
|
||||||
else if(sym == XK_F4)
|
case XK_F5: emu_restart(u, boot_rom, 1); break;
|
||||||
emu_restart(u, boot_rom, 0);
|
}
|
||||||
else if(sym == XK_F5)
|
|
||||||
emu_restart(u, boot_rom, 1);
|
|
||||||
controller_down(u, &u->dev[0x80], get_button(sym));
|
controller_down(u, &u->dev[0x80], get_button(sym));
|
||||||
controller_key(u, &u->dev[0x80], sym < 0x80 ? sym : (Uint8)buf[0]);
|
controller_key(u, &u->dev[0x80], sym < 0x80 ? sym : (Uint8)buf[0]);
|
||||||
} break;
|
} break;
|
||||||
|
|
Loading…
Reference in New Issue