small debug and comments change
authorHolger Schemel <info@artsoft.org>
Tue, 7 Oct 2014 22:00:17 +0000 (00:00 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 7 Oct 2014 22:00:17 +0000 (00:00 +0200)
src/events.c

index 1d02e8c238d01295a3a9a643d0dd3e99bd9e26ff..fd735bfe3a0e427cf34510e2179d2278a5e245a5 100644 (file)
@@ -22,7 +22,7 @@
 #include "network.h"
 
 
 #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)
 
 #define DEBUG_EVENTS_BUTTON    (DEBUG_EVENTS   * 0)
 #define DEBUG_EVENTS_MOTION    (DEBUG_EVENTS   * 0)
@@ -801,11 +801,7 @@ void HandleTextEvent(TextEvent *event)
   }
 #endif
 
   }
 #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);
   if (checkTextInputKeyModState())
   {
     HandleKey(key, KEY_PRESSED);
@@ -854,6 +850,7 @@ void HandleKeyEvent(KeyEvent *event)
   HandleKeyModState(keymod, key_status);
 
 #if defined(TARGET_SDL2)
   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
   if (!checkTextInputKeyModState())
     HandleKey(key, key_status);
 #else