Implement joystick swapping

This commit is contained in:
simon.kagstrom 2010-01-25 16:31:20 +00:00
parent 0c5570e64a
commit 7619e36910
2 changed files with 5 additions and 9 deletions

View File

@ -261,10 +261,6 @@ void C64::VBlank(bool draw_frame)
uint32_t now;
uint8 j1, j2;
#if defined(GEKKO)
WPAD_ScanPads();
#endif
// Poll joysticks
j1 = poll_joystick(0);
j2 = poll_joystick(1);
@ -276,13 +272,12 @@ void C64::VBlank(bool draw_frame)
if (this->fake_key_sequence)
this->run_fake_key_sequence();
#ifndef GEKKO
// Joystick keyboard emulation
if (TheDisplay->NumLock())
/* Keyboard joystick input */
if (ThePrefs.JoystickSwap)
j1 &= joykey;
else
j2 &= joykey;
#endif
if (this->network_connection_type == MASTER)
{

View File

@ -56,6 +56,7 @@ public:
void updatePrefs()
{
Gui::gui->np->JoystickSwap = !this->p_submenus[0].sel;
Gui::gui->np->Emul1541Proc = !this->p_submenus[1].sel;
Gui::gui->np->ShowLEDs = !this->p_submenus[2].sel;
Gui::gui->np->DisplayOption = this->p_submenus[3].sel;
@ -77,7 +78,7 @@ public:
{
int submenu_defs[5];
submenu_defs[0] = 0;
submenu_defs[0] = Gui::gui->np->JoystickSwap == true ? 0 : 1;
submenu_defs[1] = !Gui::gui->np->Emul1541Proc;
submenu_defs[2] = !Gui::gui->np->ShowLEDs;
submenu_defs[3] = Gui::gui->np->DisplayOption;