From e08a8fc3568730524a1d7f7104239cf0225065dc Mon Sep 17 00:00:00 2001 From: Matt Gajownik Date: Sat, 28 Nov 2020 11:08:11 +1100 Subject: [PATCH] UI: Don't round non-integer High DPI scale This fixes an issue on Windows where loading on a 150% scale display renders OBS windows at 200%. Reference: https://doc.qt.io/qt-5/qguiapplication.html#setHighDpiScaleFactorRoundingPolicy --- UI/obs-app.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index ab7ee45ec..5735417b9 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -1932,6 +1932,10 @@ static int run_program(fstream &logFile, int argc, char *argv[]) #if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + QGuiApplication::setHighDpiScaleFactorRoundingPolicy( + Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); +#endif #if !defined(_WIN32) && !defined(__APPLE__) && BROWSER_AVAILABLE setenv("QT_NO_GLIB", "1", true);