summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/bit_field.h3
-rw-r--r--src/core/perf_stats.cpp2
-rw-r--r--src/yuzu/main.cpp12
-rw-r--r--src/yuzu/main.h2
4 files changed, 16 insertions, 3 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h
index 65e357dec..732201de7 100644
--- a/src/common/bit_field.h
+++ b/src/common/bit_field.h
@@ -178,8 +178,7 @@ public:
return ExtractValue(storage);
}
- // TODO: we may want to change this to explicit operator bool() if it's bug-free in VS2015
- constexpr FORCE_INLINE bool ToBool() const {
+ constexpr explicit operator bool() const {
return Value() != 0;
}
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp
index 8e09b9b63..4e5633edb 100644
--- a/src/core/perf_stats.cpp
+++ b/src/core/perf_stats.cpp
@@ -76,7 +76,7 @@ double PerfStats::GetLastFrameTimeScale() {
void FrameLimiter::DoFrameLimiting(microseconds current_system_time_us) {
// Max lag caused by slow frames. Can be adjusted to compensate for too many slow frames. Higher
// values increase the time needed to recover and limit framerate again after spikes.
- constexpr microseconds MAX_LAG_TIME_US = 25us;
+ constexpr microseconds MAX_LAG_TIME_US = 25000us;
if (!Settings::values.toggle_framelimit) {
return;
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;