rnd-20020403-1-src
[rocksndiamonds.git] / src / events.c
index 4bf6da2d2ece4046f314267a48ae0d589eadee8a..a4b60829e90a139f35aeff1bc19a9cbfab278b3e 100644 (file)
@@ -477,6 +477,7 @@ void HandleKey(Key key, int key_status)
   /* allow quick escape to the main menu with the Escape key */
   if (key == KSYM_Escape &&
       game_status != MAINMENU &&
+      game_status != PLAYING &&
       game_status != LEVELED &&
       game_status != CHOOSELEVEL &&
       game_status != SETUP)
@@ -486,6 +487,14 @@ void HandleKey(Key key, int key_status)
     return;
   }
 
+  /* special shortcuts for quick game tape saving and loading */
+  if (game_status == MAINMENU || game_status == PLAYING)
+  {
+    if (key == setup.shortcut.save_game)
+      TapeQuickSave();
+    else if (key == setup.shortcut.load_game)
+      TapeQuickLoad();
+  }
 
 
 #ifndef DEBUG
@@ -584,6 +593,9 @@ void HandleKey(Key key, int key_status)
     {
       switch(key)
       {
+        case KSYM_Escape:
+         RequestQuitGame();
+         break;
 
 #ifdef DEBUG
        case KSYM_0: