From: Holger Schemel Date: Mon, 18 Sep 2000 23:03:53 +0000 (+0200) Subject: rnd-20000919-1-src X-Git-Tag: 2.0.0^2~41 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=4c23826c2c9f8f6c7d1fec69769ba0d7254c9a7c rnd-20000919-1-src --- diff --git a/src/events.c b/src/events.c index d3f8196b..7da6e553 100644 --- a/src/events.c +++ b/src/events.c @@ -79,13 +79,15 @@ void EventLoop(void) } } } - - HandleNoXEvent(); + else + HandleNoEvent(); /* don't use all CPU time when idle; the main loop while playing has its own synchronization and is CPU friendly, too */ - if (game_status != PLAYING) + if (game_status == PLAYING) + HandleGameActions(); + else { SyncDisplay(); if (!PendingEvent()) /* delay only if no pending events */ @@ -258,7 +260,7 @@ void HandleMotionEvent(MotionEvent *event) if (!PointerInWindow(window)) return; /* window and pointer are on different screens */ -#if 0 +#if 1 if (button_status == MB_RELEASED && game_status != LEVELED) return; #endif @@ -738,7 +740,7 @@ void HandleKey(Key key, int key_status) } } -void HandleNoXEvent() +void HandleNoEvent() { if (button_status && game_status != PLAYING) { @@ -752,9 +754,6 @@ void HandleNoXEvent() #endif HandleJoystick(); - - if (game_status == PLAYING) - HandleGameActions(); } static int HandleJoystickForAllPlayers() diff --git a/src/events.h b/src/events.h index a1388b2c..70079f65 100644 --- a/src/events.h +++ b/src/events.h @@ -29,7 +29,7 @@ void HandleKeyEvent(KeyEvent *); void HandleFocusEvent(FocusChangeEvent *); void HandleClientMessageEvent(ClientMessageEvent *event); -void HandleNoXEvent(void); +void HandleNoEvent(void); void HandleButton(int, int, int); void HandleKey(Key, int);