follow-up, program_state

This commit is contained in:
nhmall
2024-07-13 16:31:35 -04:00
parent 72d2b0414c
commit 0eb7f109e0
67 changed files with 255 additions and 252 deletions
+4 -4
View File
@@ -457,16 +457,16 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_CLOSE: {
/* exit gracefully */
if (svp.program_state.gameover) {
if (program_state.gameover) {
/* assume the user really meant this, as the game is already
* over... */
/* to make sure we still save bones, just set stop printing flag
*/
svp.program_state.stopprint++;
program_state.stopprint++;
NHEVENT_KBD(
'\033'); /* and send keyboard input as if user pressed ESC */
/* additional code for this is done in menu and rip windows */
} else if (!svp.program_state.something_worth_saving) {
} else if (!program_state.something_worth_saving) {
/* User exited before the game started, e.g. during splash display
*/
/* Just get out. */
@@ -842,7 +842,7 @@ onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
case IDM_SAVE:
if (iflags.debug_fuzzer)
break;
if (!svp.program_state.gameover && !svp.program_state.done_hup)
if (!program_state.gameover && !program_state.done_hup)
dosave();
else
MessageBeep(0);