ofxImGui
ofxImGui copied to clipboard
Fail to load the previously GUI saved state (locale problem)
Hi,
I discovered a locale related problem when ImGui load the GUI configuration from the disk. I lose my windows positions and size everytime I start the app.
The problem is that ImGui parse the gui.ini file with the function sscanf, which in my case interpret the commas as numeric dots.
i.e.
Pos:60,10
is read as
x = 60.10
y = 0.0
instead of
x = 60.0
y = 10.0
I can fix it by adding:
#include <locale.h>
setlocale(LC_NUMERIC, "C");
in my ofApp.cpp, but this seems dirty to me.
I opened a topic about that in the forum: https://forum.openframeworks.cc/t/problem-with-locale-and-sscanf-ofximgui-related/30178
And this is the occasion to thank you for this addon !