summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-08-09 19:05:47 +0200
committerGitHub <noreply@github.com>2022-08-09 19:05:47 +0200
commitada667060ae81c49583ec8441d4330c31016b24c (patch)
tree25072e45075f40635c91bd35d3f32deca977012c /src
parentMerge pull request #8734 from liamwhite/bors-is-my-best-friend (diff)
parentQt5 work around for suzhou numerals (diff)
downloadyuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar.gz
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar.bz2
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar.lz
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar.xz
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.tar.zst
yuzu-ada667060ae81c49583ec8441d4330c31016b24c.zip
Diffstat (limited to 'src')
-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[]) {
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
QApplication app(argc, argv);
+ // Workaround for QTBUG-85409, for Suzhou numerals the number 1 is actually \u3021
+ // so we can see if we get \u3008 instead
+ // TL;DR all other number formats are consecutive in unicode code points
+ // This bug is fixed in Qt6, specifically 6.0.0-alpha1
+ const QLocale locale = QLocale::system();
+ if (QStringLiteral("\u3008") == locale.toString(1)) {
+ QLocale::setDefault(QLocale::system().name());
+ }
+
// Qt changes the locale and causes issues in float conversion using std::to_string() when
// generating shaders
setlocale(LC_ALL, "C");