Windows sync

This commit is contained in:
Jack Andersen
2016-12-10 15:50:26 -10:00
parent fa45c6750a
commit 25fadc7348
7 changed files with 349 additions and 68 deletions

View File

@@ -1092,7 +1092,18 @@ public:
float getVirtualPixelFactor() const
{
return 1.0;
#if _WIN32_WINNT_WINBLUE
if (MyGetScaleFactorForMonitor)
{
DEVICE_SCALE_FACTOR Factor;
HMONITOR mon = MonitorFromWindow(m_hwnd, MONITOR_DEFAULTTOPRIMARY);
MyGetScaleFactorForMonitor(mon, &Factor);
if (Factor == DEVICE_SCALE_FACTOR_INVALID)
return 1.f;
return Factor / 100.f;
}
#endif
return 1.f;
}
bool isFullscreen() const