summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-05-14 05:18:28 +0200
committerbunnei <ericbunnie@gmail.com>2014-05-14 05:18:28 +0200
commit0de78eb3c4407cfedb8779422d96b7ee73fc19ed (patch)
treef73e18968732eeaec4f8833c7f7a1d0954e5f2bb /src/core/hle
parentvarious cleanups / remove unused code (diff)
downloadyuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar.gz
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar.bz2
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar.lz
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar.xz
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.tar.zst
yuzu-0de78eb3c4407cfedb8779422d96b7ee73fc19ed.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/thread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 95ef2c173..c59d2a689 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -417,7 +417,6 @@ void ThreadContext::reset() {
for (int i = 0; i < 16; i++) {
reg[i] = 0;
}
- reg[13] = Memory::SCRATCHPAD_VADDR_END;
cpsr = 0;
}
@@ -464,6 +463,7 @@ Thread* __KernelCreateThread(UID& id, UID module_id, const char* name, u32 prior
void __KernelResetThread(Thread *t, int lowest_priority) {
t->context.reset();
t->context.pc = t->nt.entry_point;
+ t->context.reg[13] = t->nt.initial_stack;
// If the thread would be better than lowestPriority, reset to its initial. Yes, kinda odd...
if (t->nt.current_priority < lowest_priority) {