request save on exit wip

This commit is contained in:
2018-07-30 23:35:27 +02:00
parent a66af9abb8
commit 87fcea61b8
7 changed files with 42 additions and 3 deletions

View File

@@ -47,6 +47,11 @@ std::string GetLastErrorAsString()
return message;
}
void destroy_window()
{
DestroyWindow(hWnd);
}
void async_lock()
{
//std::lock_guard<std::mutex> _lock(async_mutex);
@@ -456,7 +461,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
BT_SetTerminate();
break;
case WM_CLOSE:
PostQuitMessage(0);
if (App::I.request_close())
PostQuitMessage(0);
else return true;
break;
case WM_SIZE:
{