diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 532d762c77..bcf5932e73 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -16,6 +16,20 @@ #include "main_window.h" +#ifdef _WIN32 +#include + +static void OverrideWindowsFont() { + // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrillic characters + // Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters. + const QString startup_font = QApplication::font().family(); + const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")}; + if (ugly_fonts.contains(startup_font)) { + QApplication::setFont(QFont(QStringLiteral("MS Shell Dlg 2"), 9, QFont::Normal)); + } +} +#endif + static void SetHighDPIAttributes() { #ifdef _WIN32 // For Windows, we want to avoid scaling artifacts on fractional scaling ratios. diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index b7798e5189..cdc75c5950 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -352,18 +352,6 @@ static QString PrettyProductName() { return QSysInfo::prettyProductName(); } -#ifdef _WIN32 -static void OverrideWindowsFont() { - // Qt5 chooses these fonts on Windows and they have fairly ugly alphanumeric/cyrillic characters - // Asking to use "MS Shell Dlg 2" gives better other chars while leaving the Chinese Characters. - const QString startup_font = QApplication::font().family(); - const QStringList ugly_fonts = {QStringLiteral("SimSun"), QStringLiteral("PMingLiU")}; - if (ugly_fonts.contains(startup_font)) { - QApplication::setFont(QFont(QStringLiteral("MS Shell Dlg 2"), 9, QFont::Normal)); - } -} -#endif - #ifndef _WIN32 // TODO(crueter): carboxyl does this, is it needed in qml? inline static bool isDarkMode() { diff --git a/src/yuzu/main_window.h b/src/yuzu/main_window.h index abdda9e672..a6138de4bf 100644 --- a/src/yuzu/main_window.h +++ b/src/yuzu/main_window.h @@ -29,6 +29,7 @@ #include #include #include +#include #endif #ifdef ENABLE_UPDATE_CHECKER @@ -568,7 +569,7 @@ private: #ifdef __unix__ QSocketNotifier* sig_interrupt_notifier; - static std::array sig_interrupt_fds; + static std::array sig_interrupt_QSocketNotifds; #endif std::filesystem::path GetEdenCommand();