summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-03-18 22:35:47 -0400
committerGravatar GitHub2018-03-18 22:35:47 -0400
commit23a0d2d7b77fa619edc7d69d0162bd3071b67b4b (patch)
tree85f20b5e8bbd0b1b2b6e28eac6224908a0f3b7fe /src/core/core.cpp
parentMerge pull request #250 from bunnei/buffer-dequeue-wait (diff)
parentImplements citra-emu/citra#3184 (diff)
downloadyuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.tar.gz
yuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.tar.xz
yuzu-23a0d2d7b77fa619edc7d69d0162bd3071b67b4b.zip
Merge pull request #193 from N00byKing/3184_2_robotic_boogaloo
Implement Pull #3184 from citra: core/arm: Improve timing accuracy before service calls in JIT (Rebased)
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 ac6cb9e6e..183c5109c 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) {