mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
Set the appropriate locale to get float conversion working using std::to_string
This commit is contained in:
parent
2d40891b45
commit
9d8a724225
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <clocale>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
|
@ -563,6 +564,9 @@ int main(int argc, char* argv[]) {
|
||||||
QApplication::setAttribute(Qt::AA_X11InitThreads);
|
QApplication::setAttribute(Qt::AA_X11InitThreads);
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
|
// Qt changes the locale and causes issues in float conversion using std::to_string() when generating shaders
|
||||||
|
setlocale(LC_ALL, "C");
|
||||||
|
|
||||||
GMainWindow main_window;
|
GMainWindow main_window;
|
||||||
// After settings have been loaded by GMainWindow, apply the filter
|
// After settings have been loaded by GMainWindow, apply the filter
|
||||||
log_filter.ParseFilterString(Settings::values.log_filter);
|
log_filter.ParseFilterString(Settings::values.log_filter);
|
||||||
|
|
Loading…
Reference in a new issue