mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 06:40:07 +00:00
Merge pull request #4338 from FearlessTobi/port-1490
Port yuzu-emu/yuzu#1490: "citra_qt/main: Simplify OnMenuLoadFile()"
This commit is contained in:
commit
eadd8b91b2
@ -1017,20 +1017,20 @@ void GMainWindow::OnGameListShowList(bool show) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void GMainWindow::OnMenuLoadFile() {
|
void GMainWindow::OnMenuLoadFile() {
|
||||||
QString extensions;
|
const QString extensions =
|
||||||
for (const auto& piece : game_list->supported_file_extensions)
|
QString("*.").append(GameList::supported_file_extensions.join(" *."));
|
||||||
extensions += "*." + piece + " ";
|
const QString file_filter = tr("3DS Executable (%1);;All Files (*.*)",
|
||||||
|
"%1 is an identifier for the 3DS executable file extensions.")
|
||||||
|
.arg(extensions);
|
||||||
|
const QString filename = QFileDialog::getOpenFileName(
|
||||||
|
this, tr("Load File"), UISettings::values.roms_path, file_filter);
|
||||||
|
|
||||||
QString file_filter = tr("3DS Executable") + " (" + extensions + ")";
|
if (filename.isEmpty()) {
|
||||||
file_filter += ";;" + tr("All Files (*.*)");
|
return;
|
||||||
|
|
||||||
QString filename = QFileDialog::getOpenFileName(this, tr("Load File"),
|
|
||||||
UISettings::values.roms_path, file_filter);
|
|
||||||
if (!filename.isEmpty()) {
|
|
||||||
UISettings::values.roms_path = QFileInfo(filename).path();
|
|
||||||
|
|
||||||
BootGame(filename);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UISettings::values.roms_path = QFileInfo(filename).path();
|
||||||
|
BootGame(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnMenuInstallCIA() {
|
void GMainWindow::OnMenuInstallCIA() {
|
||||||
|
Loading…
Reference in New Issue
Block a user