Added suggested file names to AVI/WAV Record As file dialogs.
This commit is contained in:
parent
7717e699cd
commit
df56e32027
|
@ -3630,7 +3630,7 @@ void consoleWin_t::aviRecordAsStart(void)
|
|||
QString filename;
|
||||
std::string lastPath;
|
||||
//char dir[512];
|
||||
const char *base;
|
||||
const char *base, *rom;
|
||||
QFileDialog dialog(this, tr("Save AVI Movie for Recording") );
|
||||
QList<QUrl> urls;
|
||||
QDir d;
|
||||
|
@ -3670,6 +3670,19 @@ void consoleWin_t::aviRecordAsStart(void)
|
|||
dialog.setDirectory( QString::fromStdString(lastPath) );
|
||||
}
|
||||
|
||||
rom = getRomFile();
|
||||
|
||||
if ( rom )
|
||||
{
|
||||
char baseName[512];
|
||||
getFileBaseName( rom, baseName );
|
||||
|
||||
if ( baseName[0] != 0 )
|
||||
{
|
||||
dialog.selectFile(baseName);
|
||||
}
|
||||
}
|
||||
|
||||
// Check config option to use native file dialog or not
|
||||
g_config->getOption ("SDL.UseNativeFileDialog", &useNativeFileDialogVal);
|
||||
|
||||
|
@ -3877,7 +3890,7 @@ void consoleWin_t::wavRecordAsStart(void)
|
|||
QString filename;
|
||||
std::string lastPath;
|
||||
//char dir[512];
|
||||
const char *base;
|
||||
const char *base, *rom;
|
||||
QFileDialog dialog(this, tr("Save WAV Movie for Recording") );
|
||||
QList<QUrl> urls;
|
||||
QDir d;
|
||||
|
@ -3917,6 +3930,19 @@ void consoleWin_t::wavRecordAsStart(void)
|
|||
dialog.setDirectory( QString::fromStdString(lastPath) );
|
||||
}
|
||||
|
||||
rom = getRomFile();
|
||||
|
||||
if ( rom )
|
||||
{
|
||||
char baseName[512];
|
||||
getFileBaseName( rom, baseName );
|
||||
|
||||
if ( baseName[0] != 0 )
|
||||
{
|
||||
dialog.selectFile(baseName);
|
||||
}
|
||||
}
|
||||
|
||||
// Check config option to use native file dialog or not
|
||||
g_config->getOption ("SDL.UseNativeFileDialog", &useNativeFileDialogVal);
|
||||
|
||||
|
|
Loading…
Reference in New Issue