improved startup speed by optimizing parsing of parameter values
[rocksndiamonds.git] / src / events.c
index 2df4eb7bc3a3a4320f6ed4a36b79419b6e06e093..3a303fa5e5fc20155b1e179401e3e79b9ed881e6 100644 (file)
@@ -1386,6 +1386,10 @@ static boolean checkTextInputKey(Key key)
   if (game_status == GAME_MODE_PLAYING)
     return FALSE;
 
+  // ignore raw keys as text input when not in text input mode
+  if (KSYM_RAW(key) && !textinput_status)
+    return FALSE;
+
   // else handle all printable keys as text input
   return KSYM_PRINTABLE(key);
 }
@@ -1855,6 +1859,11 @@ static void HandleKeysSpecial(Key key)
     {
       DumpTape(&tape);
     }
+    else if (strSuffix(cheat_input, ":undo-tape") ||
+            strSuffix(cheat_input, ":ut"))
+    {
+      UndoTape();
+    }
     else if (strSuffix(cheat_input, ":fix-tape") ||
             strSuffix(cheat_input, ":ft"))
     {