X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fjoystick.cpp;h=6ed1fa12194989594a9e234d44884e57d2e8c15b;hb=74e7dd93689112ab80538d98cc5fd9bfe7a08078;hp=453c521cd84027f2ba7d8645b192da5ab4b3ec60;hpb=7b8f7a2f13727201b2e6b6bcdbe60e31e56cfcd9;p=virtualjaguar diff --git a/src/joystick.cpp b/src/joystick.cpp index 453c521..6ed1fa1 100644 --- a/src/joystick.cpp +++ b/src/joystick.cpp @@ -44,6 +44,8 @@ static uint8 joystick_ram[4]; static uint8 joypad_0_buttons[21]; static uint8 joypad_1_buttons[21]; extern bool finished; +extern bool showGUI; +bool GUIKeyHeld = false; extern int start_logging; int gpu_start_log = 0; int op_start_log = 0; @@ -118,8 +120,18 @@ void joystick_exec(void) if (keystate[SDLK_z]) joypad_0_buttons[BUTTON_C] = 0x01; if (keystate[SDLK_x]) joypad_0_buttons[BUTTON_B] = 0x01; if (keystate[SDLK_c]) joypad_0_buttons[BUTTON_A] = 0x01; - if (keystate[SDLK_TAB]) joypad_0_buttons[BUTTON_OPTION] = 0x01; +//I may yet move these to O and P... + if (keystate[SDLK_QUOTE]) joypad_0_buttons[BUTTON_OPTION] = 0x01; if (keystate[SDLK_RETURN]) joypad_0_buttons[BUTTON_PAUSE] = 0x01; + + if (keystate[SDLK_TAB]) + { + if (!GUIKeyHeld) + showGUI = !showGUI, GUIKeyHeld = true; + } + else + GUIKeyHeld = false; + if (keystate[SDLK_q]) start_logging = 1; if (keystate[SDLK_w])