mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-14 22:03:27 +01:00
don't use DisableProcessWindowsGhosting, it got too bad side-effects
This commit is contained in:
parent
8841285ba9
commit
ab2d86f983
@ -31,7 +31,6 @@ typedef BOOL(__stdcall* SETPROCESSDPIAWARENESSCONTEXTPROC)(DPI_AWARENESS_CONTEXT
|
|||||||
|
|
||||||
#if (_WIN32_WINNT < _WIN32_WINNT_WINXP)
|
#if (_WIN32_WINNT < _WIN32_WINNT_WINXP)
|
||||||
#define SetThreadExecutionState(a)
|
#define SetThreadExecutionState(a)
|
||||||
#define DisableProcessWindowsGhosting()
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,11 +57,6 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
|||||||
g_dbg_exception_handle = add_handler(1, (PVECTORED_EXCEPTION_HANDLER)dbg_vectored_exception_handler);
|
g_dbg_exception_handle = add_handler(1, (PVECTORED_EXCEPTION_HANDLER)dbg_vectored_exception_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_config.darkcolony_hack)
|
|
||||||
{
|
|
||||||
DisableProcessWindowsGhosting();
|
|
||||||
}
|
|
||||||
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))
|
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))
|
||||||
|
@ -780,6 +780,14 @@ BOOL WINAPI fake_GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wM
|
|||||||
|
|
||||||
BOOL WINAPI fake_PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg)
|
BOOL WINAPI fake_PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg)
|
||||||
{
|
{
|
||||||
|
if (g_config.darkcolony_hack && !hWnd)
|
||||||
|
{
|
||||||
|
hWnd = g_ddraw.hwnd;
|
||||||
|
|
||||||
|
MSG msg;
|
||||||
|
real_PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
|
||||||
|
}
|
||||||
|
|
||||||
if (g_config.limiter_type == LIMIT_PEEKMESSAGE &&
|
if (g_config.limiter_type == LIMIT_PEEKMESSAGE &&
|
||||||
g_ddraw.ticks_limiter.tick_length > 0 &&
|
g_ddraw.ticks_limiter.tick_length > 0 &&
|
||||||
InterlockedExchange(&g_ddraw.render.screen_updated, FALSE))
|
InterlockedExchange(&g_ddraw.render.screen_updated, FALSE))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user