summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-21 16:20:56 +0200
committerGitHub <noreply@github.com>2018-08-21 16:20:56 +0200
commit624239ed6b601bbf5112c9d437a3be260f216e42 (patch)
tree3db88bf21f0f1f602d53cecaa07ed42c36de23af /src
parentMerge pull request #1144 from MerryMage/MAX_LAG_TIME_US (diff)
parentPort #4056 from Citra: "Add Clear Recent Files menu action" (diff)
downloadyuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar
yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar.gz
yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar.bz2
yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar.lz
yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar.xz
yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar.zst
yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp12
-rw-r--r--src/yuzu/main.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 3db3f9d98..20a566b8d 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -215,6 +215,14 @@ void GMainWindow::InitializeRecentFileMenuActions() {
ui.menu_recent_files->addAction(actions_recent_files[i]);
}
+ ui.menu_recent_files->addSeparator();
+ QAction* action_clear_recent_files = new QAction(this);
+ action_clear_recent_files->setText(tr("Clear Recent Files"));
+ connect(action_clear_recent_files, &QAction::triggered, this, [this] {
+ UISettings::values.recent_files.clear();
+ UpdateRecentFiles();
+ });
+ ui.menu_recent_files->addAction(action_clear_recent_files);
UpdateRecentFiles();
}
@@ -477,6 +485,8 @@ bool GMainWindow::LoadROM(const QString& filename) {
}
return false;
}
+ game_path = filename;
+
Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt");
return true;
}
@@ -547,6 +557,8 @@ void GMainWindow::ShutdownGame() {
emu_frametime_label->setVisible(false);
emulation_running = false;
+
+ game_path.clear();
}
void GMainWindow::StoreRecentFile(const QString& filename) {
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 5f4d2ab9a..0534d4f99 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -161,6 +161,8 @@ private:
// Whether emulation is currently running in yuzu.
bool emulation_running = false;
std::unique_ptr<EmuThread> emu_thread;
+ // The path to the game currently running
+ QString game_path;
// FS
FileSys::VirtualFilesystem vfs;