From 4c23826c2c9f8f6c7d1fec69769ba0d7254c9a7c Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 19 Sep 2000 01:03:53 +0200 Subject: [PATCH] rnd-20000919-1-src --- src/events.c | 15 +++++++-------- src/events.h | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) 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); -- 2.34.1