Fix games like Paper Mario Color Splash from crashing with the message "Kernel copy thread stack allocation failed"
This commit is contained in:
parent
029bb4b14e
commit
c276347b62
@ -67,21 +67,25 @@ int kernelCopyService(int argc, void *argv) {
|
||||
}
|
||||
}
|
||||
|
||||
// This is here to avoid the warning
|
||||
return 0;
|
||||
}
|
||||
|
||||
void startKernelCopyService() {
|
||||
unsigned int stack = (unsigned int) memalign(0x40, 0x100);
|
||||
ASSERT_ALLOCATED(stack, "Kernel copy thread stack")
|
||||
|
||||
if (stack != 0) {
|
||||
stack += 0x100;
|
||||
void *thread = memalign(0x40, 0x1000);
|
||||
ASSERT_ALLOCATED(thread, "Kernel copy thread")
|
||||
|
||||
int status = OSCreateThread(thread, kernelCopyService, 1, NULL, (u32) stack + sizeof(stack), sizeof(stack), 31,
|
||||
OS_THREAD_ATTR_AFFINITY_CORE1 | OS_THREAD_ATTR_PINNED_AFFINITY | OS_THREAD_ATTR_DETACH);
|
||||
OS_THREAD_ATTR_AFFINITY_CORE1 | OS_THREAD_ATTR_PINNED_AFFINITY |
|
||||
OS_THREAD_ATTR_DETACH);
|
||||
ASSERT_INTEGER(status, 1, "Creating kernel copy thread")
|
||||
// OSSetThreadName(thread, "Kernel Copier");
|
||||
OSResumeThread(thread);
|
||||
}
|
||||
}
|
||||
|
||||
#define MINIMUM_KERNEL_COMPARE_LENGTH 4
|
||||
|
BIN
tcpgecko.elf
BIN
tcpgecko.elf
Binary file not shown.
Loading…
Reference in New Issue
Block a user