Opening a lua file uses the lua directory override

This commit is contained in:
adelikat 2008-08-02 18:00:17 +00:00
parent b3a1a6780a
commit 91526befde
1 changed files with 2 additions and 0 deletions

View File

@ -1656,6 +1656,8 @@ void FCEUD_LuaRunFrom(void)
ofn.lpstrDefExt = "lua";
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; // hide previously-ignored read-only checkbox (the real read-only box is in the open-movie dialog itself)
std::string initdir = FCEU_GetPath(FCEUMKF_LUA);
ofn.lpstrInitialDir=initdir.c_str();
if(GetOpenFileName( &ofn ))
{
FCEU_LoadLuaCode(szFileName);