1
0
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:
FunkyFr3sh 2025-01-16 06:29:04 +01:00
parent 8841285ba9
commit ab2d86f983
3 changed files with 8 additions and 6 deletions

View File

@ -31,7 +31,6 @@ typedef BOOL(__stdcall* SETPROCESSDPIAWARENESSCONTEXTPROC)(DPI_AWARENESS_CONTEXT
#if (_WIN32_WINNT < _WIN32_WINNT_WINXP)
#define SetThreadExecutionState(a)
#define DisableProcessWindowsGhosting()
#endif
#endif

View File

@ -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);
}
if (g_config.darkcolony_hack)
{
DisableProcessWindowsGhosting();
}
char buf[1024];
if (GetEnvironmentVariable("__COMPAT_LAYER", buf, sizeof(buf)))

View File

@ -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)
{
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 &&
g_ddraw.ticks_limiter.tick_length > 0 &&
InterlockedExchange(&g_ddraw.render.screen_updated, FALSE))