aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-04-12 17:53:15 +0200
committerStapleButter <thetotalworm@gmail.com>2017-04-12 17:53:15 +0200
commit54eeb38d3df54aef7211442d2355c822f093b56f (patch)
treee91df8fdbca91bae50d6b8cabba893adf8939b46
parentdb20d7408e4ca8f8ef253a9bb703525a9672f8cc (diff)
make CPU freezes take place immediately. fixes RaymanRR2 backgrounds occasionally getting cut in half.
-rw-r--r--src/NDS.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index 7bd5c1a..98eda41 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -558,8 +558,16 @@ bool HaltInterrupted(u32 cpu)
void StopCPU(u32 cpu, u32 mask)
{
- if (cpu) mask <<= 16;
- CPUStop |= mask;
+ if (cpu)
+ {
+ CPUStop |= (mask << 16);
+ ARM7->Halt(2);
+ }
+ else
+ {
+ CPUStop |= mask;
+ ARM9->Halt(2);
+ }
}
void ResumeCPU(u32 cpu, u32 mask)