1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

add GameHandlesClose from ts-ddraw

This commit is contained in:
FunkyFr3sh 2018-11-16 01:14:05 +01:00
parent 7f67f1c03f
commit ff8528a72c
2 changed files with 3 additions and 1 deletions

View File

@ -3,3 +3,4 @@ LIBRARY ddraw.dll
EXPORTS
DirectDrawCreate @1
DirectDrawEnumerateA @2
GameHandlesClose DATA

View File

@ -46,6 +46,7 @@ IDirectDrawImpl *ddraw = NULL;
RECT WindowRect = { .left = -32000, .top = -32000, .right = 0, .bottom = 0 };
int WindowState = -1;
BOOL Direct3D9Active;
BOOL GameHandlesClose;
//BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
@ -956,7 +957,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* C&C and RA really don't want to close down */
case WM_SYSCOMMAND:
if (wParam == SC_CLOSE)
if (wParam == SC_CLOSE && !GameHandlesClose)
{
exit(0);
}