SAFERHANGUP win ce (from <Someone>)

This commit is contained in:
nethack.allison
2003-09-30 03:41:02 +00:00
parent 3671f12b0a
commit 4349f52899
3 changed files with 43 additions and 1 deletions
+11
View File
@@ -480,7 +480,18 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
case WM_CLOSE:
{
/* exit gracefully */
#ifdef SAFERHANGUP
/* destroy popup window - it has its own loop and we need to
return control to NetHack core at this point */
if( IsWindow( GetNHApp()->hPopupWnd ) )
SendMessage( GetNHApp()->hPopupWnd, WM_COMMAND, IDCANCEL, 0);
/* tell NetHack core that "hangup" is requested */
hangup(1);
#else
dosave0();
terminate(EXIT_SUCCESS);
#endif
} return 0;
/*-----------------------------------------------------------------------*/