From 0b6814a0056bd4583e7c4418d4b8b90698058287 Mon Sep 17 00:00:00 2001 From: tkgstrator Date: Wed, 1 Jul 2026 16:36:05 +0000 Subject: [PATCH 1/2] fix(afk): publish entrySlots[GAME_ORCHESTRATOR_IS_AFK] on chinlan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `KIOUAfkDisableAlwaysFalseInstall` used to only route through `KIOUHookInstall`, which is a no-op for slot publishing on chinlan (it returns the bypass entry so callers can invoke orig; it does not write into the entry slot table). That meant the AFK cave BLR'd through a NULL `entrySlots[GAME_ORCHESTRATOR_IS_AFK]` and crashed on the first `IsAfkEnabled` call — the exact regression the "always false" installer exists to prevent. Write the slot directly on chinlan so a plain `KIOUAfkDisableAlwaysFalseInstall(unityBase)` call in the consumer tweak is enough. JB path keeps calling `KIOUHookInstall` (which does the right thing there via `MSHookFunction`). Co-Authored-By: Claude Opus 4.7 --- KIOUHook.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/KIOUHook.m b/KIOUHook.m index a295ec5..6db57cc 100644 --- a/KIOUHook.m +++ b/KIOUHook.m @@ -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 } From 20271b3567c1cc6cccc1e95d36da2c1a11cbb61d Mon Sep 17 00:00:00 2001 From: tkgstrator Date: Wed, 1 Jul 2026 16:45:21 +0000 Subject: [PATCH 2/2] ci: update trigger branch from main to master The default branch was renamed main -> master; workflow triggers need to match or push events / PR CI won't fire. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2db3b59..6a4cdc2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,9 +25,9 @@ name: ci on: push: - branches: [main] + branches: [master] pull_request: - branches: [main] + branches: [master] workflow_dispatch: concurrency: