mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
add GameHandlesClose from ts-ddraw
This commit is contained in:
parent
7f67f1c03f
commit
ff8528a72c
@ -3,3 +3,4 @@ LIBRARY ddraw.dll
|
|||||||
EXPORTS
|
EXPORTS
|
||||||
DirectDrawCreate @1
|
DirectDrawCreate @1
|
||||||
DirectDrawEnumerateA @2
|
DirectDrawEnumerateA @2
|
||||||
|
GameHandlesClose DATA
|
||||||
|
@ -46,6 +46,7 @@ IDirectDrawImpl *ddraw = NULL;
|
|||||||
RECT WindowRect = { .left = -32000, .top = -32000, .right = 0, .bottom = 0 };
|
RECT WindowRect = { .left = -32000, .top = -32000, .right = 0, .bottom = 0 };
|
||||||
int WindowState = -1;
|
int WindowState = -1;
|
||||||
BOOL Direct3D9Active;
|
BOOL Direct3D9Active;
|
||||||
|
BOOL GameHandlesClose;
|
||||||
|
|
||||||
//BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
//BOOL WINAPI DllMainCRTStartup(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
|
||||||
BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
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 */
|
/* C&C and RA really don't want to close down */
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
if (wParam == SC_CLOSE)
|
if (wParam == SC_CLOSE && !GameHandlesClose)
|
||||||
{
|
{
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user