Skip to content

Commit

Permalink
Don't sleep on service handles for the time being
Browse files Browse the repository at this point in the history
  • Loading branch information
wheremyfoodat committed Oct 6, 2023
1 parent 8d6c222 commit 2ab37b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/kernel/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ void Kernel::waitSynchronizationN() {
if (handleCount <= 0)
Helpers::panic("WaitSyncN: Invalid handle count");

// Temporary hack: Until we implement service sessions properly, don't bother sleeping when WaitSyncN targets a service handle
// This is necessary because a lot of games use WaitSyncN with eg the CECD service
if (handleCount == 1 && KernelHandles::isServiceHandle(mem.read32(handles))) {
regs[0] = Result::Success;
regs[1] = 0;
return;
}

using WaitObject = std::pair<Handle, KernelObject*>;
std::vector<WaitObject> waitObjects(handleCount);

Expand Down

0 comments on commit 2ab37b3

Please sign in to comment.