summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorN00byKing <N00byKing@users.noreply.github.com>2018-02-14 18:47:48 +0100
committerN00byKing <N00byKing@hotmail.de>2018-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
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.gz
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.bz2
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.lz
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.xz
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.tar.zst
yuzu-bc88cae0c730ece6d027778267eb0fa256479bda.zip
Diffstat (limited to '')
-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 {
/*static*/ System System::s_instance;
-System::ResultStatus System::RunLoop(int tight_loop) {
+System::ResultStatus System::RunLoop(bool tight_loop) {
status = ResultStatus::Success;
if (!cpu_core) {
return ResultStatus::ErrorNotInitialized;
@@ -40,7 +40,7 @@ System::ResultStatus System::RunLoop(int tight_loop) {
if (GDBStub::GetCpuHaltFlag()) {
if (GDBStub::GetCpuStepFlag()) {
GDBStub::SetCpuStepFlag(false);
- tight_loop = 1;
+ tight_loop = false;
} else {
return ResultStatus::Success;
}
@@ -56,7 +56,11 @@ System::ResultStatus System::RunLoop(int tight_loop) {
PrepareReschedule();
} else {
CoreTiming::Advance();
- cpu_core->Run(tight_loop);
+ if (tight_loop) {
+ cpu_core->Run();
+ } else {
+ cpu_core->Step();
+ }
}
HW::Update();
@@ -66,7 +70,7 @@ System::ResultStatus System::RunLoop(int tight_loop) {
}
System::ResultStatus System::SingleStep() {
- return RunLoop(1);
+ return RunLoop(false);
}
System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& filepath) {