QtHost: Fix locale crash on non-Windows machines
Some checks failed
🐧 Linux Builds / AppImage (push) Has been cancelled
🐧 Linux Builds / Flatpak (push) Has been cancelled
🍎 MacOS Builds / Defaults (push) Has been cancelled
🖥️ Windows Builds / Lint VS Project Files (push) Has been cancelled
🖥️ Windows Builds / CMake (push) Has been cancelled
🖥️ Windows Builds / SSE4 (push) Has been cancelled
🖥️ Windows Builds / AVX2 (push) Has been cancelled
🏭 Update Controller Database / update-controller-db (push) Has been cancelled

This commit is contained in:
TheTechnician27 2025-10-25 16:16:54 -05:00 committed by Ty
parent cac6669423
commit f648a9a438

View File

@ -2328,7 +2328,12 @@ int main(int argc, char* argv[])
{
CrashHandler::Install();
// Exceptions are disabled, so we can't try/catch this.
// Timestamps in some locales showed up wrong on Windows.
// Qt already applies the user locale on Unix-like systems.
#ifdef _WIN32
std::locale::global(std::locale(""));
#endif
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
QtHost::RegisterTypes();