Commit 45c550ba authored by cutealien's avatar cutealien

Fix: File-open dialog now restores the original locale after modifying it internally

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5189 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 013a268e
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- Fix: File-open dialog now restores the original locale after modifying it internally
- Fix first calculation of the camerascenenode boundingsphere. - Fix first calculation of the camerascenenode boundingsphere.
- Fix bug with ignored opening brace in .X files with DeclData section. Thx @Alin for bugreport and patch. - Fix bug with ignored opening brace in .X files with DeclData section. Thx @Alin for bugreport and patch.
- Fix problem with OpenGL textures cache. - Fix problem with OpenGL textures cache.
......
...@@ -375,7 +375,10 @@ void CGUIFileOpenDialog::fillListBox() ...@@ -375,7 +375,10 @@ void CGUIFileOpenDialog::fillListBox()
FileList = FileSystem->createFileList(); FileList = FileSystem->createFileList();
core::stringw s; core::stringw s;
setlocale(LC_ALL,""); #ifndef _IRR_WCHAR_FILESYSTEM
char* oldLocale = setlocale(LC_ALL, NULL);
setlocale(LC_ALL,""); // mbstowcs is affected by LC_CTYPE. Filenames seem to need the system-locale.
#endif
if (FileList) if (FileList)
{ {
...@@ -413,6 +416,10 @@ void CGUIFileOpenDialog::fillListBox() ...@@ -413,6 +416,10 @@ void CGUIFileOpenDialog::fillListBox()
FileDirectory = s; FileDirectory = s;
FileNameText->setText(s.c_str()); FileNameText->setText(s.c_str());
} }
#ifndef _IRR_WCHAR_FILESYSTEM
setlocale(LC_ALL, oldLocale);
#endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment