Browse Source
Merge pull request #5285 from lioncash/error-str
main: Resolve error string not displaying
pull/15/merge
Rodrigo Locatti
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
2 deletions
-
src/core/loader/loader.cpp
-
src/core/loader/loader.h
-
src/yuzu/main.cpp
|
|
|
@ -185,6 +185,10 @@ constexpr std::array<const char*, 66> RESULT_MESSAGES{ |
|
|
|
"The INI file contains more than the maximum allowable number of KIP files.", |
|
|
|
}; |
|
|
|
|
|
|
|
std::string GetResultStatusString(ResultStatus status) { |
|
|
|
return RESULT_MESSAGES.at(static_cast<std::size_t>(status)); |
|
|
|
} |
|
|
|
|
|
|
|
std::ostream& operator<<(std::ostream& os, ResultStatus status) { |
|
|
|
os << RESULT_MESSAGES.at(static_cast<std::size_t>(status)); |
|
|
|
return os; |
|
|
|
|
|
|
|
@ -135,6 +135,7 @@ enum class ResultStatus : u16 { |
|
|
|
ErrorINITooManyKIPs, |
|
|
|
}; |
|
|
|
|
|
|
|
std::string GetResultStatusString(ResultStatus status); |
|
|
|
std::ostream& operator<<(std::ostream& os, ResultStatus status); |
|
|
|
|
|
|
|
/// Interface for loading an application |
|
|
|
|
|
|
|
@ -1058,8 +1058,9 @@ bool GMainWindow::LoadROM(const QString& filename, std::size_t program_index) { |
|
|
|
tr("%1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the " |
|
|
|
"yuzu quickstart guide</a> to redump your files.<br>You can refer " |
|
|
|
"to the yuzu wiki</a> or the yuzu Discord</a> for help.", |
|
|
|
"%1 signifies a numeric error ID.") |
|
|
|
.arg(error_id); |
|
|
|
"%1 signifies an error string.") |
|
|
|
.arg(QString::fromStdString( |
|
|
|
GetResultStatusString(static_cast<Loader::ResultStatus>(error_id)))); |
|
|
|
|
|
|
|
QMessageBox::critical(this, title, description); |
|
|
|
} else { |
|
|
|
|