Floating point string format
Posted: Fri Feb 10, 2012 11:32 am
Hello everybody.
I've got a nice issue right here. When I launch my game with it's own executable, everything runs fine.
If I run it within a wxwidget application, material parameters are wrong.
The cause? The floating point string format, which is "," in french system, and "." in us-en systems. So for example, sccanf will return either 0.05 or 0 when parsing this string
"param_named_auto psTime time 0.05", depending on which application I execute, the game or my wxwidget tool.
Of course I don't want to have multiple version of my material files, so I wonder if there is a way to force, at application startup, the format of the floating point in strings?
I also don't want to force users to change their system settings before running application.
Thanks.
I've got a nice issue right here. When I launch my game with it's own executable, everything runs fine.
If I run it within a wxwidget application, material parameters are wrong.
The cause? The floating point string format, which is "," in french system, and "." in us-en systems. So for example, sccanf will return either 0.05 or 0 when parsing this string
"param_named_auto psTime time 0.05", depending on which application I execute, the game or my wxwidget tool.
Of course I don't want to have multiple version of my material files, so I wonder if there is a way to force, at application startup, the format of the floating point in strings?
I also don't want to force users to change their system settings before running application.
Thanks.