mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Disabled dynamic thread priority boosts
Fixes performance issues in The Longest Journey.
This commit is contained in:
parent
c8ecb227a3
commit
f29c371b8b
@ -179,6 +179,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID /*lpvReserved*/)
|
|||||||
VISIT_ALL_DDRAW_PROCS(LOAD_ORIGINAL_DDRAW_PROC);
|
VISIT_ALL_DDRAW_PROCS(LOAD_ORIGINAL_DDRAW_PROC);
|
||||||
Compat::origProcs.DirectInputCreateA = GetProcAddress(g_origDInputModule, "DirectInputCreateA");
|
Compat::origProcs.DirectInputCreateA = GetProcAddress(g_origDInputModule, "DirectInputCreateA");
|
||||||
|
|
||||||
|
const BOOL disablePriorityBoost = TRUE;
|
||||||
|
SetProcessPriorityBoost(GetCurrentProcess(), disablePriorityBoost);
|
||||||
SetProcessAffinityMask(GetCurrentProcess(), 1);
|
SetProcessAffinityMask(GetCurrentProcess(), 1);
|
||||||
SetThemeAppProperties(0);
|
SetThemeAppProperties(0);
|
||||||
Time::init();
|
Time::init();
|
||||||
|
@ -121,7 +121,7 @@ namespace
|
|||||||
if (!g_updateThread)
|
if (!g_updateThread)
|
||||||
{
|
{
|
||||||
g_updateThread = CreateThread(nullptr, 0, &updateThreadProc, nullptr, 0, nullptr);
|
g_updateThread = CreateThread(nullptr, 0, &updateThreadProc, nullptr, 0, nullptr);
|
||||||
SetThreadPriority(g_updateThread, THREAD_PRIORITY_ABOVE_NORMAL);
|
SetThreadPriority(g_updateThread, THREAD_PRIORITY_TIME_CRITICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
surface->SetPrivateData(surface, IID_IReleaseNotifier,
|
surface->SetPrivateData(surface, IID_IReleaseNotifier,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user