Fix for different per-monitor scaling (#657)

* Use DPIAware::DEFAULT_DPI

* Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI.

* Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls

* Increase PCH memory limit for settings project

* Address review issues

* Draw zoneWindows properly scaled
This commit is contained in:
yuyoyuppe
2019-11-07 21:56:32 +03:00
committed by GitHub
parent a9518c2e55
commit f3e25ae3e6
14 changed files with 300 additions and 178 deletions

View File

@@ -37,4 +37,8 @@ void DPIAware::Convert(HMONITOR monitor_handle, int &width, int &height) {
width = width * dpi_x / DEFAULT_DPI;
height = height * dpi_y / DEFAULT_DPI;
}
}
}
void DPIAware::EnableDPIAwarenessForThisProcess() {
SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
}