summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2022-08-09 10:05:47 -0700
committerGravatar GitHub2022-08-09 10:05:47 -0700
commitada667060ae81c49583ec8441d4330c31016b24c (patch)
tree25072e45075f40635c91bd35d3f32deca977012c
parentMerge pull request #8734 from liamwhite/bors-is-my-best-friend (diff)
parentQt5 work around for suzhou numerals (diff)
downloadyuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar.gz
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar.xz
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.zip
Merge pull request #8715 from Docteh/suzhou
Qt5 work around for suzhou numerals
-rw-r--r--src/yuzu/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 653280642..378b40205 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -4072,6 +4072,15 @@ int main(int argc, char* argv[]) {
4072 QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity); 4072 QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
4073 QApplication app(argc, argv); 4073 QApplication app(argc, argv);
4074 4074
4075 // Workaround for QTBUG-85409, for Suzhou numerals the number 1 is actually \u3021
4076 // so we can see if we get \u3008 instead
4077 // TL;DR all other number formats are consecutive in unicode code points
4078 // This bug is fixed in Qt6, specifically 6.0.0-alpha1
4079 const QLocale locale = QLocale::system();
4080 if (QStringLiteral("\u3008") == locale.toString(1)) {
4081 QLocale::setDefault(QLocale::system().name());
4082 }
4083
4075 // Qt changes the locale and causes issues in float conversion using std::to_string() when 4084 // Qt changes the locale and causes issues in float conversion using std::to_string() when
4076 // generating shaders 4085 // generating shaders
4077 setlocale(LC_ALL, "C"); 4086 setlocale(LC_ALL, "C");