summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 5685fbf29..609886dfd 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -300,6 +300,10 @@ void GMainWindow::StoreRecentFile(const QString& filename)
QStringList recent_files = settings.value("recentFiles").toStringList();
recent_files.prepend(filename);
recent_files.removeDuplicates();
+ while (recent_files.size() > max_recent_files_item) {
+ recent_files.removeLast();
+ }
+
settings.setValue("recentFiles", recent_files);
UpdateRecentFiles();