File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed
Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -7891,6 +7891,7 @@ void System()
78917891 the_player_menu.position (0 , 0 );
78927892
78937893 bool running = true ;
7894+ bool esc = key[KEY_ESC] || cMbtn ();
78947895 do
78957896 {
78967897 if (reload_fonts)
@@ -7903,8 +7904,6 @@ void System()
79037904 if (handle_close_btn_quit ())
79047905 break ;
79057906
7906- rest (17 );
7907-
79087907 // update submenus
79097908 {
79107909 settings_menu.disable_uid (MENUID_SETTINGS_CONTROLS, replay_is_replaying ());
@@ -7975,6 +7974,13 @@ void System()
79757974 if (debug_enabled)
79767975 settings_menu.select_uid (MENUID_SETTINGS_DEBUG, get_debug ());
79777976
7977+ if (the_player_menu.run ())
7978+ the_player_menu.reset_state ();
7979+
7980+ update_hw_screen ();
7981+
7982+ rest (1 );
7983+
79787984 auto mb = gui_mouse_b ();
79797985 if (XOR (mb, mouse_down))
79807986 {
@@ -7994,8 +8000,6 @@ void System()
79948000 sys_mouse ();
79958001 }
79968002
7997- if (the_player_menu.run ())
7998- the_player_menu.reset_state ();
79998003 if (keypressed ()) // System hotkeys
80008004 {
80018005 auto c = readkey ();
@@ -8031,10 +8035,20 @@ void System()
80318035 case KEY_TAB:
80328036 onDebug ();
80338037 break ;
8038+ case KEY_ESC:
8039+ running = false ;
8040+ break ;
80348041 }
80358042 }
8036-
8037- update_hw_screen ();
8043+ if (esc)
8044+ {
8045+ if (running)
8046+ {
8047+ if (!key[KEY_ESC])
8048+ esc = false ;
8049+ }
8050+ else running = true ;
8051+ }
80388052 }
80398053 while (running);
80408054
You can’t perform that action at this time.
0 commit comments