Seems to be a bug in FileOpenDialog element

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
REAPER
Posts: 8
Joined: Sat May 08, 2004 10:52 pm
Location: Russia, Moscow

Seems to be a bug in FileOpenDialog element

Post by REAPER »

In my project I use Lua scripts. In main loop I call function to execute script file, like this:

Code: Select all

while (device->run() && driver)
{
    if (device->isWindowActive())
    {
        driver->beginScene(true, true, video::SColor(0, 0, 0, 0));
        execScriptFile("Data\\Scripts\\script.lua");
        driver->endScene();
     }
}
It seems that when in FileOpenDialog element I change folder, the engine also change current working directory. So OS can't find script.lua file.
Of course I can remember at the begining of program execution current working dir and than use it.
Is it bug, or it must be so?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

No the file open dialog works that way. Another solution would be to store the current working directory and reset it only before/after the file open dialog call.
Post Reply