aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorJustin Weiss2019-10-02 17:49:12 -0700
committerJustin Weiss2019-10-02 17:54:06 -0700
commite237fbf62ef226bd5c5be317c6b837cb7515a150 (patch)
treec157875461d9083e83cc3491ed20e610f24c6b1f /frontend
parente989dfc6d5e44b0c61c481399e40833ffce6942a (diff)
downloadpcsx_rearmed-e237fbf62ef226bd5c5be317c6b837cb7515a150.tar.gz
pcsx_rearmed-e237fbf62ef226bd5c5be317c6b837cb7515a150.tar.bz2
pcsx_rearmed-e237fbf62ef226bd5c5be317c6b837cb7515a150.zip
3DS: Schedule threads on the default core
When creating a thread, pcsx was scheduling threads on core 1, which is the system core. This is usually prevented by the system. Instead, it should schedule threads on the default core, as suggested by 3dbrew: https://www.3dbrew.org/wiki/Multi-threading > Games usually create threads using -2. In the future, we may be able to schedule threads on core 2 on New 3DS only, if we find it gives better performance. This was preventing the CDDA thread from starting, which was preventing CD Audio from playing.
Diffstat (limited to 'frontend')
-rw-r--r--frontend/3ds/pthread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/3ds/pthread.h b/frontend/3ds/pthread.h
index 2c2bf6b..42de161 100644
--- a/frontend/3ds/pthread.h
+++ b/frontend/3ds/pthread.h
@@ -25,7 +25,7 @@ static inline int pthread_create(pthread_t *thread,
svcCreateThread(&thread->handle, start_routine, arg,
(uint32_t*)((uint32_t)thread->stack + CTR_PTHREAD_STACK_SIZE),
- 0x25, 1);
+ 0x25, -2);
return 1;
}