X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=a4b60829e90a139f35aeff1bc19a9cbfab278b3e;hb=2443a8a09966a9940e1420c91d24a297325c2a00;hp=4bf6da2d2ece4046f314267a48ae0d589eadee8a;hpb=a1bc27d0855dc6fa72c4c361fc1671b2dcc6547b;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 4bf6da2d..a4b60829 100644 --- a/src/events.c +++ b/src/events.c @@ -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: