diff options
| author | 2021-01-03 19:56:15 -0300 | |
|---|---|---|
| committer | 2021-01-03 19:56:15 -0300 | |
| commit | 87a892552398ab34e4a5cc1b832ee886a1ff87e9 (patch) | |
| tree | 8fc6fd1b1d83f3064463cae190eea7a235fbbcf5 | |
| parent | Merge pull request #5230 from ReinUsesLisp/vulkan-common (diff) | |
| parent | main: Resolve error string not displaying (diff) | |
| download | yuzu-87a892552398ab34e4a5cc1b832ee886a1ff87e9.tar.gz yuzu-87a892552398ab34e4a5cc1b832ee886a1ff87e9.tar.xz yuzu-87a892552398ab34e4a5cc1b832ee886a1ff87e9.zip | |
Merge pull request #5285 from lioncash/error-str
main: Resolve error string not displaying
Diffstat (limited to '')
| -rw-r--r-- | src/core/loader/loader.cpp | 4 | ||||
| -rw-r--r-- | src/core/loader/loader.h | 1 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 5 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index d91c15561..e4f5fd40c 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -185,6 +185,10 @@ constexpr std::array<const char*, 66> RESULT_MESSAGES{ | |||
| 185 | "The INI file contains more than the maximum allowable number of KIP files.", | 185 | "The INI file contains more than the maximum allowable number of KIP files.", |
| 186 | }; | 186 | }; |
| 187 | 187 | ||
| 188 | std::string GetResultStatusString(ResultStatus status) { | ||
| 189 | return RESULT_MESSAGES.at(static_cast<std::size_t>(status)); | ||
| 190 | } | ||
| 191 | |||
| 188 | std::ostream& operator<<(std::ostream& os, ResultStatus status) { | 192 | std::ostream& operator<<(std::ostream& os, ResultStatus status) { |
| 189 | os << RESULT_MESSAGES.at(static_cast<std::size_t>(status)); | 193 | os << RESULT_MESSAGES.at(static_cast<std::size_t>(status)); |
| 190 | return os; | 194 | return os; |
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index 36e79e71d..b2e5b13de 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h | |||
| @@ -135,6 +135,7 @@ enum class ResultStatus : u16 { | |||
| 135 | ErrorINITooManyKIPs, | 135 | ErrorINITooManyKIPs, |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | std::string GetResultStatusString(ResultStatus status); | ||
| 138 | std::ostream& operator<<(std::ostream& os, ResultStatus status); | 139 | std::ostream& operator<<(std::ostream& os, ResultStatus status); |
| 139 | 140 | ||
| 140 | /// Interface for loading an application | 141 | /// Interface for loading an application |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 43d64b708..d1c539b72 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1058,8 +1058,9 @@ bool GMainWindow::LoadROM(const QString& filename, std::size_t program_index) { | |||
| 1058 | tr("%1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the " | 1058 | tr("%1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the " |
| 1059 | "yuzu quickstart guide</a> to redump your files.<br>You can refer " | 1059 | "yuzu quickstart guide</a> to redump your files.<br>You can refer " |
| 1060 | "to the yuzu wiki</a> or the yuzu Discord</a> for help.", | 1060 | "to the yuzu wiki</a> or the yuzu Discord</a> for help.", |
| 1061 | "%1 signifies a numeric error ID.") | 1061 | "%1 signifies an error string.") |
| 1062 | .arg(error_id); | 1062 | .arg(QString::fromStdString( |
| 1063 | GetResultStatusString(static_cast<Loader::ResultStatus>(error_id)))); | ||
| 1063 | 1064 | ||
| 1064 | QMessageBox::critical(this, title, description); | 1065 | QMessageBox::critical(this, title, description); |
| 1065 | } else { | 1066 | } else { |