fixed text event handling for newer SDL versions on Android
[rocksndiamonds.git] / src / libgame / system.c
index af3e053607781e7e1b83ed5dfb911396584f6441..9a8d117b85f1f2c7e6f78c3b35d8b582d0e9f311 100644 (file)
@@ -57,6 +57,7 @@ int                   button_status = MB_NOT_PRESSED;
 boolean                        motion_status = FALSE;
 int                    wheel_steps = DEFAULT_WHEEL_STEPS;
 boolean                        keyrepeat_status = TRUE;
+boolean                        textinput_status = FALSE;
 
 int                    redraw_mask = REDRAW_NONE;
 
@@ -1753,6 +1754,8 @@ KeyMod GetKeyModStateFromEvents(void)
 
 void StartTextInput(int x, int y, int width, int height)
 {
+  textinput_status = TRUE;
+
 #if defined(HAS_SCREEN_KEYBOARD)
   SDL_StartTextInput();
 
@@ -1767,6 +1770,8 @@ void StartTextInput(int x, int y, int width, int height)
 
 void StopTextInput(void)
 {
+  textinput_status = FALSE;
+
 #if defined(HAS_SCREEN_KEYBOARD)
   SDL_StopTextInput();