]> granicus.if.org Git - nethack/commitdiff
win32: avoid game exit dialog lacking any explanation
authornhmall <nhmall@nethack.org>
Thu, 24 Dec 2020 01:31:54 +0000 (20:31 -0500)
committernhmall <nhmall@nethack.org>
Thu, 24 Dec 2020 01:31:54 +0000 (20:31 -0500)
win/win32/mswproc.c

index 754071f523ad2571f9c143c9452ca67cb2f23964..a439deca5cbd177863ee917a561fdd7f0dff61d7 100644 (file)
@@ -2796,6 +2796,8 @@ int
 NHMessageBox(HWND hWnd, LPCTSTR text, UINT type)
 {
     TCHAR title[MAX_LOADSTRING];
+    if (g.program_state.exiting && !strcmp(text, "\n"))
+        text = "Press Enter to exit";
 
     LoadString(GetNHApp()->hApp, IDS_APP_TITLE_SHORT, title, MAX_LOADSTRING);