mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
[Kernel] Fix DuplicateHandle, fix typo, panic on FS::OpenFileDirectly
This commit is contained in:
parent
fca54b99a7
commit
88c93645e3
4 changed files with 21 additions and 4 deletions
|
@ -173,10 +173,11 @@ void Kernel::duplicateHandle() {
|
|||
logSVC("DuplicateHandle(handle = %X)\n", original);
|
||||
|
||||
if (original == KernelHandles::CurrentThread) {
|
||||
printf("[Warning] Duplicated current thread. This might be horribly broken!\n");
|
||||
const auto& t = threads[currentThreadIndex];
|
||||
regs[0] = SVCResult::Success;
|
||||
regs[1] = makeThread(t.entrypoint, t.initialSP, t.priority, t.processorID, t.arg, t.status);
|
||||
Handle ret = makeObject(KernelObjectType::Thread);
|
||||
objects[ret].data = &threads[currentThreadIndex];
|
||||
|
||||
regs[1] = ret;
|
||||
} else {
|
||||
Helpers::panic("DuplicateHandle: unimplemented handle type");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue