From bbc30c590dd1f6bf874c1486aeff2f3529e0e26b Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sat, 20 Feb 2010 15:02:34 +0000 Subject: [PATCH] Partially fix joystick handling, more to come --- Src/C64_SDL.h | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/Src/C64_SDL.h b/Src/C64_SDL.h index 45ef49c..d4db79f 100644 --- a/Src/C64_SDL.h +++ b/Src/C64_SDL.h @@ -168,14 +168,12 @@ void C64::network_vblank() remote->Tick( now - last_time_update ); if (this->network_connection_type == MASTER) { if (ThePrefs.JoystickSwap) - js = &TheCIA1->Joystick1; - else js = &TheCIA1->Joystick2; + else + js = &TheCIA1->Joystick1; } else { - if (ThePrefs.JoystickSwap) + /* Both are the same */ js = &TheCIA1->Joystick2; - else - js = &TheCIA1->Joystick1; } remote->ResetNetworkUpdate(); @@ -268,21 +266,10 @@ void C64::VBlank(bool draw_frame) else j2 &= joykey; - if (this->network_connection_type == MASTER) + if (this->network_connection_type == CLIENT) { - /* Only poll one joystick for network servers */ - if (ThePrefs.JoystickSwap) - TheCIA1->Joystick2 = j2; - else - TheCIA1->Joystick1 = j2; - } - else if (this->network_connection_type == CLIENT) - { - Uint8 which = j2; + Uint8 which = j1; - /* Set both joysticks to the updated value */ - if (j2 != 0xff) - which = j2; TheCIA1->Joystick1 = which; TheCIA1->Joystick2 = which; }