fix obvious errors

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1581 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2002-08-07 09:21:39 +00:00
parent 4681e09aac
commit 999e2127af

View file

@ -52,54 +52,56 @@ int button_set_release(int newmask)
static int real_button_get(void)
{
if (bActive)
{
if (KEY (VK_NUMPAD4) ||
KEY (VK_LEFT)) // left button
btn |= BUTTON_LEFT;
int btn;
if (KEY (VK_NUMPAD6) ||
KEY (VK_RIGHT))
btn |= BUTTON_RIGHT; // right button
if (bActive)
{
if (KEY (VK_NUMPAD4) ||
KEY (VK_LEFT)) // left button
btn |= BUTTON_LEFT;
if (KEY (VK_NUMPAD8) ||
KEY (VK_UP))
btn |= BUTTON_UP; // up button
if (KEY (VK_NUMPAD6) ||
KEY (VK_RIGHT))
btn |= BUTTON_RIGHT; // right button
if (KEY (VK_NUMPAD2) ||
KEY (VK_DOWN))
btn |= BUTTON_DOWN; // down button
if (KEY (VK_NUMPAD8) ||
KEY (VK_UP))
btn |= BUTTON_UP; // up button
if (KEY (VK_ADD))
btn |= BUTTON_ON; // on button
if (KEY (VK_NUMPAD2) ||
KEY (VK_DOWN))
btn |= BUTTON_DOWN; // down button
if (KEY (VK_ADD))
btn |= BUTTON_ON; // on button
#ifdef HAVE_RECORDER_KEYPAD
if (KEY (VK_RETURN))
btn |= BUTTON_OFF; // off button
if (KEY (VK_DIVIDE) || KEY(VK_F1))
btn |= BUTTON_F1; // F1 button
if (KEY (VK_RETURN))
btn |= BUTTON_OFF; // off button
if (KEY (VK_DIVIDE) || KEY(VK_F1))
btn |= BUTTON_F1; // F1 button
if (KEY (VK_MULTIPLY) || KEY(VK_F2))
btn |= BUTTON_F2; // F2 button
if (KEY (VK_MULTIPLY) || KEY(VK_F2))
btn |= BUTTON_F2; // F2 button
if (KEY (VK_SUBTRACT) || KEY(VK_F3))
btn |= BUTTON_F3; // F3 button
if (KEY (VK_SUBTRACT) || KEY(VK_F3))
btn |= BUTTON_F3; // F3 button
if (KEY (VK_NUMPAD5) ||
KEY (VK_SPACE))
btn |= BUTTON_PLAY; // play button
if (KEY (VK_NUMPAD5) ||
KEY (VK_SPACE))
btn |= BUTTON_PLAY; // play button
#else
if (KEY (VK_RETURN))
btn |= BUTTON_MENU; // menu button
if (KEY (VK_RETURN))
btn |= BUTTON_MENU; // menu button
#endif
if (btn != 0) {
last_key = 0 ;
}
}
if (btn != 0) {
last_key = 0 ;
}
}
return btn;
return btn;
}
int button_get(bool block)
@ -132,7 +134,7 @@ int button_get_w_tmo(int ticks)
else
break;
} while (block);
} while (--ticks);
return btn;
}