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
7ad669a9
There was an error fetching the commit references. Please try again later.
Commit
7ad669a9
authored
9 years ago
by
LittleWhite
Browse files
Options
Downloads
Patches
Plain Diff
Display errors in GUI when loading ROM failed
parent
5eeef06c
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
+26
-1
26 additions, 1 deletion
src/citra_qt/main.cpp
src/core/loader/loader.cpp
+3
-2
3 additions, 2 deletions
src/core/loader/loader.cpp
with
29 additions
and
3 deletions
src/citra_qt/main.cpp
+
26
−
1
View file @
7ad669a9
...
...
@@ -259,9 +259,34 @@ void GMainWindow::BootGame(const std::string& filename) {
System
::
Init
(
render_window
);
// Load the game
if
(
Loader
::
ResultStatus
::
Success
!=
Loader
::
LoadFile
(
filename
))
{
Loader
::
ResultStatus
result
=
Loader
::
LoadFile
(
filename
);
if
(
Loader
::
ResultStatus
::
Success
!=
result
)
{
LOG_CRITICAL
(
Frontend
,
"Failed to load ROM!"
);
System
::
Shutdown
();
switch
(
result
)
{
case
Loader
::
ResultStatus
::
ErrorEncrypted
:
{
// Build the MessageBox ourselves to have clickable link
QMessageBox
popup_error
;
popup_error
.
setTextFormat
(
Qt
::
RichText
);
popup_error
.
setWindowTitle
(
tr
(
"Error while loading ROM !"
));
popup_error
.
setText
(
tr
(
"The ROM is probably encrypted !<br/><br/>"
"Please check: <a href='https://github.com/citra-emu/citra/wiki/Dumping-Game-Cartridges'>https://github.com/citra-emu/citra/wiki/Dumping-Game-Cartridges</a>"
));
popup_error
.
setIcon
(
QMessageBox
::
Critical
);
popup_error
.
exec
();
break
;
}
case
Loader
::
ResultStatus
::
ErrorInvalidFormat
:
QMessageBox
::
critical
(
this
,
tr
(
"Error while loading ROM !"
),
tr
(
"The ROM format is not supported."
));
break
;
case
Loader
::
ResultStatus
::
Error
:
default
:
QMessageBox
::
critical
(
this
,
tr
(
"Error while loading ROM !"
),
tr
(
"Unknown error !"
));
break
;
}
return
;
}
...
...
This diff is collapsed.
Click to expand it.
src/core/loader/loader.cpp
+
3
−
2
View file @
7ad669a9
...
...
@@ -137,11 +137,12 @@ ResultStatus LoadFile(const std::string& filename) {
AppLoader_NCCH
app_loader
(
std
::
move
(
file
),
filename
);
// Load application and RomFS
if
(
ResultStatus
::
Success
==
app_loader
.
Load
())
{
ResultStatus
result
=
app_loader
.
Load
();
if
(
ResultStatus
::
Success
==
result
)
{
Service
::
FS
::
RegisterArchiveType
(
Common
::
make_unique
<
FileSys
::
ArchiveFactory_RomFS
>
(
app_loader
),
Service
::
FS
::
ArchiveIdCode
::
RomFS
);
return
ResultStatus
::
Success
;
}
b
re
ak
;
re
turn
result
;
}
// CIA file format...
...
...
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