1
0
Fork 0

Opt out of Qt's DPI scaling by default

This commit is contained in:
James Turner 2018-07-03 09:48:49 +01:00
parent 6dd374408c
commit 81f4ce5ea8

View file

@ -266,9 +266,15 @@ void initApp(int& argc, char** argv, bool doInitQSettings)
// this gets into a knot on Optimus setups (since we export the magic
// Optimus / AMD symbols in main.cxx).
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
// becuase on Windows, Qt only supports integer scaling factors,
// forceibly enabling HighDpiScaling is controversial.
// leave things unset here, so users can use env var
// QT_AUTO_SCREEN_SCALE_FACTOR=1 to enable it at runtime
//#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
// QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
//#endif
static_qApp.reset(new QApplication(s_argc, argv));
static_qApp->setOrganizationName("FlightGear");
static_qApp->setApplicationName("FlightGear");