main: set locale to C before doing anything else

This commit is contained in:
Megamouse 2023-02-24 15:53:30 +01:00
parent e46dba43ad
commit 7cb3d305d4

View File

@ -3,6 +3,7 @@
#include <iostream>
#include <chrono>
#include <clocale>
#include <QApplication>
#include <QCommandLineParser>
@ -72,6 +73,13 @@ DYNAMIC_IMPORT("ntdll.dll", NtSetTimerResolution, NTSTATUS(ULONG DesiredResoluti
#include "util/sysinfo.hpp"
// Let's initialize the locale first
static const bool s_init_locale = []()
{
std::setlocale(LC_ALL, "C");
return true;
}();
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
static semaphore<> s_qt_init;