mirror of
https://github.com/x64dbg/x64dbg.git
synced 2024-11-23 13:00:14 +00:00
Merge pull request #3406 from torusrxxx/patch000000fc-1
Remove high DPI modes incompatible with windows dialog
This commit is contained in:
commit
5a127fc4e8
@ -422,7 +422,6 @@ static void deleteZoneData(const std::wstring & rootDir)
|
||||
}
|
||||
|
||||
typedef BOOL(WINAPI* LPFN_SetProcessDpiAwarenessContext)(int);
|
||||
typedef BOOL(WINAPI* LPFN_SetProcessDPIAware)();
|
||||
|
||||
static void EnableHiDPI()
|
||||
{
|
||||
@ -431,21 +430,7 @@ static void EnableHiDPI()
|
||||
if(SetProcessDpiAwarenessContext != nullptr)
|
||||
{
|
||||
// Windows 10 Build 1703
|
||||
if(SetProcessDpiAwarenessContext(-4)) //DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Windows 10 Build 1607
|
||||
if(SetProcessDpiAwarenessContext(-3)) //DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Windows Vista
|
||||
LPFN_SetProcessDPIAware SetProcessDPIAware = (LPFN_SetProcessDPIAware)GetProcAddress(GetModuleHandle(TEXT("user32.dll")), "SetProcessDPIAware");
|
||||
if(SetProcessDPIAware != nullptr)
|
||||
{
|
||||
SetProcessDPIAware();
|
||||
SetProcessDpiAwarenessContext(-4); //DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user