Opt out of Qt's DPI scaling by default
This commit is contained in:
parent
6dd374408c
commit
81f4ce5ea8
1 changed files with 9 additions and 3 deletions
|
@ -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
|
// this gets into a knot on Optimus setups (since we export the magic
|
||||||
// Optimus / AMD symbols in main.cxx).
|
// Optimus / AMD symbols in main.cxx).
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
// becuase on Windows, Qt only supports integer scaling factors,
|
||||||
#endif
|
// 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.reset(new QApplication(s_argc, argv));
|
||||||
static_qApp->setOrganizationName("FlightGear");
|
static_qApp->setOrganizationName("FlightGear");
|
||||||
static_qApp->setApplicationName("FlightGear");
|
static_qApp->setApplicationName("FlightGear");
|
||||||
|
|
Loading…
Add table
Reference in a new issue