]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/mainwin.cpp
Hooked up the UI/frontend controller #2 to the Jaguar core, final fixes to the
[virtualjaguar] / src / gui / mainwin.cpp
index 5794f2b0552ade2945e7b337f5dfe2e8b6351b84..892fb1fec0bdbab4b21bd3fcc5ad36d3f4ad7577 100644 (file)
@@ -316,6 +316,15 @@ void MainWin::HandleKeys(QKeyEvent * e, bool state)
                joypad_0_buttons[BUTTON_D] = 0;
        if (e->key() == (int)vjs.p1KeyBindings[BUTTON_D] && joypad_0_buttons[BUTTON_U])
                joypad_0_buttons[BUTTON_U] = 0;
+
+       if (e->key() == (int)vjs.p2KeyBindings[BUTTON_L] && joypad_1_buttons[BUTTON_R])
+               joypad_0_buttons[BUTTON_R] = 0;
+       if (e->key() == (int)vjs.p2KeyBindings[BUTTON_R] && joypad_1_buttons[BUTTON_L])
+               joypad_0_buttons[BUTTON_L] = 0;
+       if (e->key() == (int)vjs.p2KeyBindings[BUTTON_U] && joypad_1_buttons[BUTTON_D])
+               joypad_0_buttons[BUTTON_D] = 0;
+       if (e->key() == (int)vjs.p2KeyBindings[BUTTON_D] && joypad_1_buttons[BUTTON_U])
+               joypad_0_buttons[BUTTON_U] = 0;
 #endif
 
        // No bad combos exist, let's stuff the emulator key buffers...!
@@ -323,6 +332,9 @@ void MainWin::HandleKeys(QKeyEvent * e, bool state)
        {
                if (e->key() == (int)vjs.p1KeyBindings[i])
                        joypad_0_buttons[i] = (uint8)state;
+
+               if (e->key() == (int)vjs.p2KeyBindings[i])
+                       joypad_1_buttons[i] = (uint8)state;
        }
 }