{
static int old_mx = 0, old_my = 0;
- if (mx<0 || my<0)
+ if (button < 0)
{
mx = old_mx;
my = old_my;
+ button = -button;
}
else
{
old_mx = mx;
old_my = my;
- HandleGadgets(mx,my, button);
HandleVideoButtons(mx,my, button);
HandleSoundButtons(mx,my, button);
HandleGameButtons(mx,my, button);
}
+ HandleGadgets(mx, my, button);
+
switch(game_status)
{
case MAINMENU:
{
if (button_status && game_status != PLAYING)
{
- HandleButton(-1,-1, button_status);
+ HandleButton(0, 0, -button_status);
return;
}
{
static unsigned long joystickmove_delay = 0;
- if (joystick && !button && !DelayReached(&joystickmove_delay, 150))
+ if (joystick && !button &&
+ !DelayReached(&joystickmove_delay, GADGET_FRAME_DELAY))
newbutton = dx = dy = 0;
if (game_status==MAINMENU)