mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Add support for building against Qt 6
This commit is contained in:
@ -132,8 +132,15 @@ int main(int argc, char* argv[])
|
||||
const optparse::Values& options = CommandLineParse::ParseArguments(parser.get(), argc, argv);
|
||||
const std::vector<std::string> args = parser->args();
|
||||
|
||||
// setHighDpiScaleFactorRoundingPolicy was added in 5.14, but default behavior changed in 6.0
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
// Set to the previous default behavior
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Round);
|
||||
#else
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("Dolphin Emulator"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("dolphin-emu.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("dolphin-emu"));
|
||||
@ -144,7 +151,7 @@ int main(int argc, char* argv[])
|
||||
QApplication app(argc, argv);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
// On Windows, Qt 5's default system font (MS Shell Dlg 2) is outdated.
|
||||
// Interestingly, the QMenu font is correct and comes from lfMenuFont
|
||||
// (Segoe UI on English computers).
|
||||
|
Reference in New Issue
Block a user