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-e03cc46cb475master
parent
013a268e2e
commit
45c550ba54
|
@ -1,6 +1,7 @@
|
|||
--------------------------
|
||||
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 bug with ignored opening brace in .X files with DeclData section. Thx @Alin for bugreport and patch.
|
||||
- Fix problem with OpenGL textures cache.
|
||||
|
|
|
@ -375,7 +375,10 @@ void CGUIFileOpenDialog::fillListBox()
|
|||
FileList = FileSystem->createFileList();
|
||||
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)
|
||||
{
|
||||
|
@ -413,6 +416,10 @@ void CGUIFileOpenDialog::fillListBox()
|
|||
FileDirectory = s;
|
||||
FileNameText->setText(s.c_str());
|
||||
}
|
||||
|
||||
#ifndef _IRR_WCHAR_FILESYSTEM
|
||||
setlocale(LC_ALL, oldLocale);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue