summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar N00byKing2018-02-14 18:47:48 +0100
committerGravatar N00byKing2018-02-25 11:44:21 +0100
commitbc88cae0c730ece6d027778267eb0fa256479bda (patch)
treeeaf8581141f7240b6cf23eda17834558b6fe1c40 /src/core/core.cpp
parentMerge pull request #190 from bunnei/fix-qt-waittree (diff)
downloadyuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.gz
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.xz
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.zip
Implements citra-emu/citra#3184
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 613a98b4c..a42cb48eb 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -26,7 +26,7 @@ namespace Core {
26 26
27/*static*/ System System::s_instance; 27/*static*/ System System::s_instance;
28 28
29System::ResultStatus System::RunLoop(int tight_loop) { 29System::ResultStatus System::RunLoop(bool tight_loop) {
30 status = ResultStatus::Success; 30 status = ResultStatus::Success;
31 if (!cpu_core) { 31 if (!cpu_core) {
32 return ResultStatus::ErrorNotInitialized; 32 return ResultStatus::ErrorNotInitialized;
@@ -40,7 +40,7 @@ System::ResultStatus System::RunLoop(int tight_loop) {
40 if (GDBStub::GetCpuHaltFlag()) { 40 if (GDBStub::GetCpuHaltFlag()) {
41 if (GDBStub::GetCpuStepFlag()) { 41 if (GDBStub::GetCpuStepFlag()) {
42 GDBStub::SetCpuStepFlag(false); 42 GDBStub::SetCpuStepFlag(false);
43 tight_loop = 1; 43 tight_loop = false;
44 } else { 44 } else {
45 return ResultStatus::Success; 45 return ResultStatus::Success;
46 } 46 }
@@ -56,7 +56,11 @@ System::ResultStatus System::RunLoop(int tight_loop) {
56 PrepareReschedule(); 56 PrepareReschedule();
57 } else { 57 } else {
58 CoreTiming::Advance(); 58 CoreTiming::Advance();
59 cpu_core->Run(tight_loop); 59 if (tight_loop) {
60 cpu_core->Run();
61 } else {
62 cpu_core->Step();
63 }
60 } 64 }
61 65
62 HW::Update(); 66 HW::Update();
@@ -66,7 +70,7 @@ System::ResultStatus System::RunLoop(int tight_loop) {
66} 70}
67 71
68System::ResultStatus System::SingleStep() { 72System::ResultStatus System::SingleStep() {
69 return RunLoop(1); 73 return RunLoop(false);
70} 74}
71 75
72System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& filepath) { 76System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& filepath) {