Win32 - RamWatch Hooked up AskSave() to the main window closing function. However, AskSave() fails to open the message box when called from there.
This commit is contained in:
parent
a13f65d415
commit
cb18c55aa2
|
@ -2563,7 +2563,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
case WM_CLOSE:
|
||||
{
|
||||
NDS_Pause();
|
||||
|
||||
if (AskSave()) //Ask Save comes from the Ram Watch dialog. The dialog uses .wch files and this allows asks the user if he wants to save changes first, should he cancel, closing will not happen
|
||||
{
|
||||
//Save window size
|
||||
WritePrivateProfileInt("Video","Window Size",windowSize,IniName);
|
||||
if (windowSize==0)
|
||||
|
@ -2593,6 +2594,9 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
//TODO: save ram watch recent files
|
||||
|
||||
ExitRunLoop();
|
||||
}
|
||||
else
|
||||
NDS_UnPause();
|
||||
return 0;
|
||||
}
|
||||
case WM_MOVING:
|
||||
|
|
Loading…
Reference in New Issue