Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
5912c9c3
There was an error fetching the commit references. Please try again later.
Commit
5912c9c3
authored
9 years ago
by
LittleWhite
Browse files
Options
Downloads
Patches
Plain Diff
Register ROM started through the gamelist in the list of ROM recently started
parent
f62935d2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/citra_qt/main.cpp
+3
-4
3 additions, 4 deletions
src/citra_qt/main.cpp
src/citra_qt/main.h
+1
-1
1 addition, 1 deletion
src/citra_qt/main.h
with
4 additions
and
5 deletions
src/citra_qt/main.cpp
+
3
−
4
View file @
5912c9c3
...
...
@@ -310,6 +310,7 @@ bool GMainWindow::LoadROM(const std::string& filename) {
void
GMainWindow
::
BootGame
(
const
std
::
string
&
filename
)
{
LOG_INFO
(
Frontend
,
"Citra starting..."
);
StoreRecentFile
(
filename
);
// Put the filename on top of the list
if
(
!
InitializeSystem
())
return
;
...
...
@@ -374,11 +375,11 @@ void GMainWindow::ShutdownGame() {
emulation_running
=
false
;
}
void
GMainWindow
::
StoreRecentFile
(
const
QS
tring
&
filename
)
void
GMainWindow
::
StoreRecentFile
(
const
std
::
s
tring
&
filename
)
{
QSettings
settings
;
QStringList
recent_files
=
settings
.
value
(
"recentFiles"
).
toStringList
();
recent_files
.
prepend
(
filename
);
recent_files
.
prepend
(
QString
::
fromStdString
(
filename
)
)
;
recent_files
.
removeDuplicates
();
while
(
recent_files
.
size
()
>
max_recent_files_item
)
{
recent_files
.
removeLast
();
...
...
@@ -426,7 +427,6 @@ void GMainWindow::OnMenuLoadFile() {
QString
filename
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Load File"
),
rom_path
,
tr
(
"3DS executable (*.3ds *.3dsx *.elf *.axf *.cci *.cxi)"
));
if
(
!
filename
.
isEmpty
())
{
settings
.
setValue
(
"romsPath"
,
QFileInfo
(
filename
).
path
());
StoreRecentFile
(
filename
);
BootGame
(
filename
.
toLocal8Bit
().
data
());
}
...
...
@@ -462,7 +462,6 @@ void GMainWindow::OnMenuRecentFile() {
QFileInfo
file_info
(
filename
);
if
(
file_info
.
exists
())
{
BootGame
(
filename
.
toLocal8Bit
().
data
());
StoreRecentFile
(
filename
);
// Put the filename on top of the list
}
else
{
// Display an error message and remove the file from the list.
QMessageBox
::
information
(
this
,
tr
(
"File not found"
),
tr
(
"File
\"
%1
\"
not found"
).
arg
(
filename
));
...
...
This diff is collapsed.
Click to expand it.
src/citra_qt/main.h
+
1
−
1
View file @
5912c9c3
...
...
@@ -75,7 +75,7 @@ private:
*
* @param filename the filename to store
*/
void
StoreRecentFile
(
const
QS
tring
&
filename
);
void
StoreRecentFile
(
const
std
::
s
tring
&
filename
);
/**
* Updates the recent files menu.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment