diff options
| author | 2018-08-21 10:20:56 -0400 | |
|---|---|---|
| committer | 2018-08-21 10:20:56 -0400 | |
| commit | 624239ed6b601bbf5112c9d437a3be260f216e42 (patch) | |
| tree | 3db88bf21f0f1f602d53cecaa07ed42c36de23af /src | |
| parent | Merge pull request #1144 from MerryMage/MAX_LAG_TIME_US (diff) | |
| parent | Port #4056 from Citra: "Add Clear Recent Files menu action" (diff) | |
| download | yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar.gz yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.tar.xz yuzu-624239ed6b601bbf5112c9d437a3be260f216e42.zip | |
Merge pull request #1140 from FearlessTobi/port-4056
Port #4056 from Citra: "Add Clear Recent Files menu action"
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 12 | ||||
| -rw-r--r-- | src/yuzu/main.h | 2 |
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() { | |||
| 215 | 215 | ||
| 216 | ui.menu_recent_files->addAction(actions_recent_files[i]); | 216 | ui.menu_recent_files->addAction(actions_recent_files[i]); |
| 217 | } | 217 | } |
| 218 | ui.menu_recent_files->addSeparator(); | ||
| 219 | QAction* action_clear_recent_files = new QAction(this); | ||
| 220 | action_clear_recent_files->setText(tr("Clear Recent Files")); | ||
| 221 | connect(action_clear_recent_files, &QAction::triggered, this, [this] { | ||
| 222 | UISettings::values.recent_files.clear(); | ||
| 223 | UpdateRecentFiles(); | ||
| 224 | }); | ||
| 225 | ui.menu_recent_files->addAction(action_clear_recent_files); | ||
| 218 | 226 | ||
| 219 | UpdateRecentFiles(); | 227 | UpdateRecentFiles(); |
| 220 | } | 228 | } |
| @@ -477,6 +485,8 @@ bool GMainWindow::LoadROM(const QString& filename) { | |||
| 477 | } | 485 | } |
| 478 | return false; | 486 | return false; |
| 479 | } | 487 | } |
| 488 | game_path = filename; | ||
| 489 | |||
| 480 | Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt"); | 490 | Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt"); |
| 481 | return true; | 491 | return true; |
| 482 | } | 492 | } |
| @@ -547,6 +557,8 @@ void GMainWindow::ShutdownGame() { | |||
| 547 | emu_frametime_label->setVisible(false); | 557 | emu_frametime_label->setVisible(false); |
| 548 | 558 | ||
| 549 | emulation_running = false; | 559 | emulation_running = false; |
| 560 | |||
| 561 | game_path.clear(); | ||
| 550 | } | 562 | } |
| 551 | 563 | ||
| 552 | void GMainWindow::StoreRecentFile(const QString& filename) { | 564 | 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: | |||
| 161 | // Whether emulation is currently running in yuzu. | 161 | // Whether emulation is currently running in yuzu. |
| 162 | bool emulation_running = false; | 162 | bool emulation_running = false; |
| 163 | std::unique_ptr<EmuThread> emu_thread; | 163 | std::unique_ptr<EmuThread> emu_thread; |
| 164 | // The path to the game currently running | ||
| 165 | QString game_path; | ||
| 164 | 166 | ||
| 165 | // FS | 167 | // FS |
| 166 | FileSys::VirtualFilesystem vfs; | 168 | FileSys::VirtualFilesystem vfs; |