Browse Source

UI: Enable high DPI scaling, for Qt >= 5.11

Closes obsproject/obs-studio#1602
Kevin Ross 6 years ago
parent
commit
a5fac7d78c
1 changed files with 4 additions and 0 deletions
  1. 4 0
      UI/obs-app.cpp

+ 4 - 0
UI/obs-app.cpp

@@ -1648,6 +1648,10 @@ static int run_program(fstream &logFile, int argc, char *argv[])
 
 	ScopeProfiler prof{run_program_init};
 
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
+	QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
+
 	QCoreApplication::addLibraryPath(".");
 
 	OBSApp program(argc, argv, profilerNameStore.get());