Skip to content

Commit

Permalink
Fix an issue where more than one GameMode Scheduler can be scheduled.
Browse files Browse the repository at this point in the history
  • Loading branch information
anr2me committed Jan 13, 2022
1 parent 4d0c738 commit 73dff05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Core/HLE/sceNetAdhoc.cpp
Expand Up @@ -440,6 +440,10 @@ int ScheduleAdhocctlState(int event, int newState, int usec, const char* reason)

int StartGameModeScheduler() {
INFO_LOG(SCENET, "Initiating GameMode Scheduler");
if (CoreTiming::IsScheduled(gameModeNotifyEvent)) {
WARN_LOG(SCENET, "GameMode Scheduler is already running!");
return -1;
}
u64 param = ((u64)__KernelGetCurThread()) << 32;
CoreTiming::ScheduleEvent(usToCycles(GAMEMODE_INIT_DELAY), gameModeNotifyEvent, param);
return 0;
Expand Down

0 comments on commit 73dff05

Please sign in to comment.