mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
SetProcessDPIAware
This commit is contained in:
parent
7a17726679
commit
1bbb2e62b7
10
src/main.c
10
src/main.c
@ -57,6 +57,16 @@ BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
|||||||
printf("cnc-ddraw DLL_PROCESS_ATTACH");
|
printf("cnc-ddraw DLL_PROCESS_ATTACH");
|
||||||
|
|
||||||
//SetProcessPriorityBoost(GetCurrentProcess(), TRUE);
|
//SetProcessPriorityBoost(GetCurrentProcess(), TRUE);
|
||||||
|
|
||||||
|
HMODULE user32 = GetModuleHandle("user32.dll");
|
||||||
|
typedef BOOL (__stdcall* SetProcessDPIAware_)();
|
||||||
|
if(user32)
|
||||||
|
{
|
||||||
|
SetProcessDPIAware_ setProcessDPIAware = (SetProcessDPIAware_)GetProcAddress(user32, "SetProcessDPIAware");
|
||||||
|
if (setProcessDPIAware)
|
||||||
|
setProcessDPIAware();
|
||||||
|
}
|
||||||
|
|
||||||
timeBeginPeriod(1);
|
timeBeginPeriod(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user