diff --git a/Src/C64_SDL.i b/Src/C64_SDL.i index ebb76ab..8fd4bc1 100644 --- a/Src/C64_SDL.i +++ b/Src/C64_SDL.i @@ -311,6 +311,8 @@ void C64::bind_key(Prefs *np) bind_key_messages[CLASSIC_B] = "Bind to classic B"; bind_key_messages[CLASSIC_L] = "Bind to classic L"; bind_key_messages[CLASSIC_R] = "Bind to classic R"; + bind_key_messages[CLASSIC_ZL] = "Bind to classic ZL"; + bind_key_messages[CLASSIC_ZR] = "Bind to classic ZR"; } menu_init(&bind_key_menu, this->menu_font, bind_key_messages, @@ -675,6 +677,8 @@ uint8 C64::poll_joystick(int port) extra_keys[CLASSIC_B] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_B; extra_keys[CLASSIC_L] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_L; extra_keys[CLASSIC_R] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_R; + extra_keys[CLASSIC_ZL] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_ZL; + extra_keys[CLASSIC_ZR] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_ZR; extra_keys[WIIMOTE_PLUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_PLUS; extra_keys[WIIMOTE_MINUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_MINUS; diff --git a/Src/Prefs.cpp b/Src/Prefs.cpp index b4fa2bf..39ec413 100644 --- a/Src/Prefs.cpp +++ b/Src/Prefs.cpp @@ -145,6 +145,8 @@ bool Prefs::operator==(const Prefs &rhs) const && this->JoystickKeyBinding[8] == rhs.JoystickKeyBinding[8] && this->JoystickKeyBinding[9] == rhs.JoystickKeyBinding[9] && this->JoystickKeyBinding[10] == rhs.JoystickKeyBinding[10] + && this->JoystickKeyBinding[11] == rhs.JoystickKeyBinding[11] + && this->JoystickKeyBinding[12] == rhs.JoystickKeyBinding[12] && this->DisplayOption == rhs.DisplayOption #endif ); @@ -334,6 +336,10 @@ void Prefs::Load(char *filename) JoystickKeyBinding[9] = atoi(value); else if (!strcmp(keyword, "JoystickKeyBinding10")) JoystickKeyBinding[10] = atoi(value); + else if (!strcmp(keyword, "JoystickKeyBinding11")) + JoystickKeyBinding[11] = atoi(value); + else if (!strcmp(keyword, "JoystickKeyBinding12")) + JoystickKeyBinding[12] = atoi(value); else if (!strcmp(keyword, "DisplayOption")) DisplayOption = atoi(value); #endif diff --git a/Src/Prefs.h b/Src/Prefs.h index 9b0adaa..eedc106 100644 --- a/Src/Prefs.h +++ b/Src/Prefs.h @@ -51,6 +51,8 @@ enum { CLASSIC_B, CLASSIC_L, CLASSIC_R, + CLASSIC_ZR, + CLASSIC_ZL, N_WIIMOTE_BINDINGS };