mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-12 21:45:40 +02:00
#289, workaround Windows 11 failure to honor DPI_AWARENESS_CONTEXT_UNAWARE
This commit is contained in:
parent
4d70854177
commit
63cd6db0e9
1 changed files with 5 additions and 0 deletions
|
@ -508,6 +508,11 @@ namespace PersistentWindows.Common.WinApiBridge
|
||||||
if (os_version.Version.Major < 10)
|
if (os_version.Version.Major < 10)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
// windows 11 workaround for #289
|
||||||
|
if (os_version.Version.Build > 22000)
|
||||||
|
if (dpi_awareness_cxt == DPI_AWARENESS_CONTEXT_UNAWARE)
|
||||||
|
return 0;
|
||||||
|
|
||||||
//valid API since win10 1607
|
//valid API since win10 1607
|
||||||
return SetThreadDpiAwarenessContext(dpi_awareness_cxt);
|
return SetThreadDpiAwarenessContext(dpi_awareness_cxt);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue