Example 09 can load russian filenames again on Linux.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5605 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
69787af02d
commit
95e4f04796
@ -29,7 +29,7 @@ using namespace gui;
|
|||||||
Some global variables used later on
|
Some global variables used later on
|
||||||
*/
|
*/
|
||||||
IrrlichtDevice *Device = 0;
|
IrrlichtDevice *Device = 0;
|
||||||
core::stringc StartUpModelFile;
|
io::path StartUpModelFile;
|
||||||
core::stringw MessageText;
|
core::stringw MessageText;
|
||||||
core::stringw Caption;
|
core::stringw Caption;
|
||||||
scene::ISceneNode* Model = 0;
|
scene::ISceneNode* Model = 0;
|
||||||
@ -166,10 +166,8 @@ Function loadModel() loads a model and displays it using an
|
|||||||
addAnimatedMeshSceneNode and the scene manager. Nothing difficult. It also
|
addAnimatedMeshSceneNode and the scene manager. Nothing difficult. It also
|
||||||
displays a short message box, if the model could not be loaded.
|
displays a short message box, if the model could not be loaded.
|
||||||
*/
|
*/
|
||||||
void loadModel(const c8* fn)
|
void loadModel(const io::path& filename)
|
||||||
{
|
{
|
||||||
io::path filename(fn);
|
|
||||||
|
|
||||||
io::path extension;
|
io::path extension;
|
||||||
core::getFileNameExtension(extension, filename);
|
core::getFileNameExtension(extension, filename);
|
||||||
extension.make_lower();
|
extension.make_lower();
|
||||||
@ -440,7 +438,7 @@ public:
|
|||||||
// load the model file, selected in the file open dialog
|
// load the model file, selected in the file open dialog
|
||||||
IGUIFileOpenDialog* dialog =
|
IGUIFileOpenDialog* dialog =
|
||||||
(IGUIFileOpenDialog*)event.GUIEvent.Caller;
|
(IGUIFileOpenDialog*)event.GUIEvent.Caller;
|
||||||
loadModel(core::stringc(dialog->getFileName()).c_str());
|
loadModel(dialog->getFileNameP());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user