X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=e46b177553430e80ffb8fdac0ad6f0246d65921c;hb=5ed4de42ced8e7dce5b786ba3d5fd1a6f6a7d7f6;hp=38f58f940148d45c43783061b548f1e26605f98a;hpb=c5728b1ebc2a1d3753a6eea5a0f6335d077eef6b;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 38f58f94..e46b1775 100644 --- a/src/events.c +++ b/src/events.c @@ -270,22 +270,24 @@ void HandleButton(int mx, int my, int button) { 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: @@ -610,7 +612,7 @@ void HandleNoXEvent() { if (button_status && game_status != PLAYING) { - HandleButton(-1,-1, button_status); + HandleButton(0, 0, -button_status); return; }