aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-09-01 08:21:29 -0400
committerbunnei <bunneidev@gmail.com>2015-09-01 08:21:29 -0400
commitf4e3d89fdd18b39aeb8df7200098f873d790ca0a (patch)
tree1d359c29f40c6f816a8a5e4852c074c0c698d93a /src
parente80c88786e427150ddc7cf6e657c25ed7b69bea0 (diff)
parente5bcc24426f1356b9edc0e0933f1adc05f967a26 (diff)
Merge pull request #1072 from yuriks/GetSystemTick-advance-time
SVC: Advance time when calling GetSystemTick to escape busy-wait loops
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/svc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 19f750d727..45d5f3c5d6 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -755,7 +755,10 @@ static void SleepThread(s64 nanoseconds) {
/// This returns the total CPU ticks elapsed since the CPU was powered-on
static s64 GetSystemTick() {
- return (s64)CoreTiming::GetTicks();
+ s64 result = CoreTiming::GetTicks();
+ // Advance time to defeat dumb games (like Cubic Ninja) that busy-wait for the frame to end.
+ Core::g_app_core->AddTicks(150); // Measured time between two calls on a 9.2 o3DS with Ninjhax 1.1b
+ return result;
}
/// Creates a memory block at the specified address with the specified permissions and size