X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=f89e5236071b7d30c8e66499a539808a868f5d53;hb=b05bf3dca0ec7d951f1113066093843804e5be06;hp=1d02e8c238d01295a3a9a643d0dd3e99bd9e26ff;hpb=36fdadd45345a6ce4402fa3bdbb3b12b4cbb62ee;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 1d02e8c2..f89e5236 100644 --- a/src/events.c +++ b/src/events.c @@ -22,7 +22,7 @@ #include "network.h" -#define DEBUG_EVENTS 1 +#define DEBUG_EVENTS 0 #define DEBUG_EVENTS_BUTTON (DEBUG_EVENTS * 0) #define DEBUG_EVENTS_MOTION (DEBUG_EVENTS * 0) @@ -231,8 +231,6 @@ void EventLoop(void) } else { - SyncDisplay(); - if (!PendingEvent()) /* delay only if no pending events */ Delay(10); } @@ -801,11 +799,7 @@ void HandleTextEvent(TextEvent *event) } #endif - // if (game_status != GAME_MODE_PLAYING && GetKeyModState() != KMOD_None) - /* - if (game_status != GAME_MODE_PLAYING && - (GetKeyModState() & KMOD_TextInput) != KMOD_None) - */ + // only handle key input with text modifier keys pressed if (checkTextInputKeyModState()) { HandleKey(key, KEY_PRESSED); @@ -854,6 +848,7 @@ void HandleKeyEvent(KeyEvent *event) HandleKeyModState(keymod, key_status); #if defined(TARGET_SDL2) + // only handle raw key input without text modifier keys pressed if (!checkTextInputKeyModState()) HandleKey(key, key_status); #else