Added a config parameter to Qt GUI to store movie directory path.

This commit is contained in:
Matthew Budd 2020-11-04 06:39:16 -05:00
parent 6672e53098
commit feff0f79c3
2 changed files with 4 additions and 2 deletions

View File

@ -1600,7 +1600,7 @@ void consoleWin_t::openMovie(void)
dialog.setFilter( QDir::AllEntries | QDir::AllDirs | QDir::Hidden );
dialog.setLabelText( QFileDialog::Accept, tr("Open") );
g_config->getOption ("SDL.LastOpenFile", &last );
g_config->getOption ("SDL.LastOpenMovie", &last );
getDirFromFile( last.c_str(), dir );
@ -1643,6 +1643,7 @@ void consoleWin_t::openMovie(void)
{
printf("Error: Could not open movie file: %s \n", filename.toStdString().c_str() );
}
g_config->setOption ("SDL.LastOpenMovie", filename.toStdString().c_str() );
fceuWrapperUnLock();
return;
@ -1685,7 +1686,7 @@ void consoleWin_t::recordMovieAs(void)
dialog.setFilter( QDir::AllEntries | QDir::AllDirs | QDir::Hidden );
dialog.setLabelText( QFileDialog::Accept, tr("Save") );
g_config->getOption ("SDL.LastOpenFile", &last );
g_config->getOption ("SDL.LastOpenMovie", &last );
getDirFromFile( last.c_str(), dir );

View File

@ -305,6 +305,7 @@ InitConfig()
config->addOption("_laststatefrom", "SDL.LastLoadStateFrom", home_dir);
config->addOption("_lastopennsf", "SDL.LastOpenNSF", home_dir);
config->addOption("_lastsavestateas", "SDL.LastSaveStateAs", home_dir);
config->addOption("_lastopenmovie", "SDL.LastOpenMovie", home_dir);
config->addOption("_lastloadlua", "SDL.LastLoadLua", "");
config->addOption("_useNativeFileDialog", "SDL.UseNativeFileDialog", false);