Skip to content

Commit

Permalink
main: set locale to C before doing anything else
Browse files Browse the repository at this point in the history
  • Loading branch information
Megamouse committed Feb 24, 2023
1 parent 0b586cd commit 350e3f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rpcs3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <iostream>
#include <chrono>
#include <clocale>

#include <QApplication>
#include <QCommandLineParser>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 350e3f6

Please sign in to comment.