Use the application's working directory by default on Windows.

main
Síle Ekaterin Liszka 2021-06-09 21:09:21 -05:00
parent ae267ecfa9
commit 929a38fc8a
1 changed files with 4 additions and 0 deletions

View File

@ -284,7 +284,11 @@ void Exdeath::btnROM_clicked(bool trigger) {
filename = QFileDialog::getOpenFileName( filename = QFileDialog::getOpenFileName(
this, this,
"Select ROM image", "Select ROM image",
#ifdef __WIN32__
QApplication::applicationDirPath(),
#else
QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation)[0], QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation)[0],
#endif
"GBA ROM images (*.gba)" "GBA ROM images (*.gba)"
); );
_cfg->setValue("rom/filename", filename); _cfg->setValue("rom/filename", filename);