aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorTheKoopaKingdom <thekoopakingdom@gmail.com>2017-06-02 17:03:38 -0400
committerTheKoopaKingdom <thekoopakingdom@gmail.com>2017-06-02 18:40:39 -0400
commitf008b22e3b2baa7720ea65c320fe49929a53bad7 (patch)
tree24a15888dd6ebc515a09eaf00623fa23e2d4665d /src/core/core.cpp
parentff04320c9716b78b7a6047e3c699a0ea4c5431b3 (diff)
Addressed Bunnei's review comments, and made some other tweaks:
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System. - Fixed design flaw where the message bar status could be set despite the game being stopped.
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 2456d8aa2b..5429bcb268 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -26,7 +26,7 @@ namespace Core {
/*static*/ System System::s_instance;
System::ResultStatus System::RunLoop(int tight_loop) {
- this->status = ResultStatus::Success;
+ status = ResultStatus::Success;
if (!cpu_core) {
return ResultStatus::ErrorNotInitialized;
}
@@ -60,7 +60,7 @@ System::ResultStatus System::RunLoop(int tight_loop) {
HW::Update();
Reschedule();
- return GetStatus();
+ return status;
}
System::ResultStatus System::SingleStep() {
@@ -99,8 +99,8 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
return init_result;
}
- Loader::ResultStatus load_result = app_loader->Load();
- if (load_result != Loader::ResultStatus::Success) {
+ const Loader::ResultStatus load_result{app_loader->Load()};
+ if (Loader::ResultStatus::Success != load_result) {
LOG_CRITICAL(Core, "Failed to load ROM (Error %i)!", load_result);
System::Shutdown();
@@ -113,9 +113,8 @@ System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& file
return ResultStatus::ErrorLoader;
}
}
- // this->status will be used for errors while actually running the game
status = ResultStatus::Success;
- return ResultStatus::Success;
+ return status;
}
void System::PrepareReschedule() {