Skip to content

Commit

Permalink
utils/qml: force C locale to ensure consistent float parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mbouron committed Sep 1, 2023
1 parent bcc1d0d commit cec90a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pynopegl-utils/pynopegl_utils/qml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# under the License.
#

import locale
import os
import os.path as op
import platform
Expand Down Expand Up @@ -51,6 +52,10 @@ def create_app_engine(argv, qml_file):
QQuickWindow.setGraphicsApi(QSGRendererInterface.OpenGL)
engine = QQmlApplicationEngine(qml_file)
engine.quit.connect(app.quit)

# Force C locale to ensure consistent float parsing
locale.setlocale(locale.LC_ALL, "C")

return app, engine


Expand Down

0 comments on commit cec90a0

Please sign in to comment.