Really fix classic controllaoi

This commit is contained in:
simon.kagstrom 2009-01-11 13:39:18 +00:00
parent 776b82c126
commit 477fffe52b
2 changed files with 5 additions and 4 deletions

View File

@ -680,8 +680,8 @@ uint8 C64::poll_joystick(int port)
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;
extra_keys[WIIMOTE_PLUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_MINUS;
extra_keys[WIIMOTE_MINUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_PLUS;
for (int i = 0; i < N_WIIMOTE_BINDINGS; i++)
{

View File

@ -261,8 +261,6 @@ void menu_fini(menu_t *p_menu)
static uint32_t wait_key_press(void)
{
SDL_Event ev;
bool classic_keys_changed = false;
Uint32 classic_last = 0;
uint32_t keys = 0;
while (1)
@ -282,6 +280,9 @@ static uint32_t wait_key_press(void)
if (wpad->exp.type == WPAD_EXP_CLASSIC ||
wpad_other->exp.type == WPAD_EXP_CLASSIC)
{
static bool classic_keys_changed;
static Uint32 classic_last;
classic_keys = wpad->exp.classic.btns | wpad_other->exp.classic.btns;
classic_keys_changed = classic_keys != classic_last;