diff options
| author | 2017-04-13 01:15:23 -0400 | |
|---|---|---|
| committer | 2017-06-02 18:28:14 -0400 | |
| commit | 0409bdfea5ea046e3d040ab494b8a0764fd35424 (patch) | |
| tree | 94540c98e22d04a8a1d6ca4d24ac3ae429ed3d97 /src/core | |
| parent | Added message to status bar to show core errors ignored by the user. (diff) | |
| download | yuzu-0409bdfea5ea046e3d040ab494b8a0764fd35424.tar.gz yuzu-0409bdfea5ea046e3d040ab494b8a0764fd35424.tar.xz yuzu-0409bdfea5ea046e3d040ab494b8a0764fd35424.zip | |
Optimized messages that were repetitive and added ability for core errors to specify more details optionally.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/core.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/core.h b/src/core/core.h index a7b4f8d62..bc363ed97 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -6,6 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <string> | 8 | #include <string> |
| 9 | |||
| 10 | #include <boost/optional.hpp> | ||
| 11 | |||
| 9 | #include "common/common_types.h" | 12 | #include "common/common_types.h" |
| 10 | #include "core/memory.h" | 13 | #include "core/memory.h" |
| 11 | #include "core/perf_stats.h" | 14 | #include "core/perf_stats.h" |
| @@ -112,8 +115,16 @@ public: | |||
| 112 | return status; | 115 | return status; |
| 113 | } | 116 | } |
| 114 | 117 | ||
| 115 | void SetStatus(ResultStatus newStatus) { | 118 | void SetStatus(ResultStatus new_status, std::string details = std::string()) { |
| 116 | status = newStatus; | 119 | status = new_status; |
| 120 | if (details == std::string()) | ||
| 121 | status_details = boost::none; | ||
| 122 | else | ||
| 123 | status_details = details; | ||
| 124 | } | ||
| 125 | |||
| 126 | boost::optional<std::string> GetStatusDetails() { | ||
| 127 | return status_details; | ||
| 117 | } | 128 | } |
| 118 | 129 | ||
| 119 | private: | 130 | private: |
| @@ -141,7 +152,9 @@ private: | |||
| 141 | std::unique_ptr<Core::TelemetrySession> telemetry_session; | 152 | std::unique_ptr<Core::TelemetrySession> telemetry_session; |
| 142 | 153 | ||
| 143 | static System s_instance; | 154 | static System s_instance; |
| 155 | |||
| 144 | ResultStatus status; | 156 | ResultStatus status; |
| 157 | boost::optional<std::string> status_details; | ||
| 145 | }; | 158 | }; |
| 146 | 159 | ||
| 147 | inline ARM_Interface& CPU() { | 160 | inline ARM_Interface& CPU() { |