Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ name: ci

on:
push:
branches: [main]
branches: [master]
pull_request:
branches: [main]
branches: [master]
workflow_dispatch:

concurrency:
Expand Down
12 changes: 12 additions & 0 deletions KIOUHook.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ static bool kiou_afk_always_false(void *self) {
}

void KIOUAfkDisableAlwaysFalseInstall(uintptr_t unityBase) {
#if IPA_CHINLAN
// KIOUHookInstall is a no-op for slot publishing on chinlan (it just
// returns the bypass entry for callers that need it), so we have to
// write the entry slot directly. Without this write the AFK cave
// would BLR through a NULL entrySlots[GAME_ORCHESTRATOR_IS_AFK] and
// crash on the first IsAfkEnabled call.
void * volatile *entrySlots =
(void * volatile *)(unityBase + KIOU_HOOK_ENTRY_SLOT_BASE_RVA);
entrySlots[KIOU_HOOK_SLOT_GAME_ORCHESTRATOR_IS_AFK] =
(void *)kiou_afk_always_false;
#else
KIOUHookInstall(KIOU_HOOK_NAME_GAME_ORCHESTRATOR_IS_AFK,
(void *)kiou_afk_always_false, unityBase);
#endif
}
Loading