修复dbgmode下歌词显示异常问题

进入 Live 时歌词默认显示(仅每个 Presenter 实例第一次设置时强制 true),
之后玩家手动开关原样透传,不再覆盖关闭操作
This commit is contained in:
chihya72
2026-08-06 02:11:55 +08:00
parent f62d6f6529
commit a74effabe7
+10 -3
View File
@@ -1806,16 +1806,23 @@ namespace GakumasLocal::HookMain {
return PictureBookLiveSelectScreenPresenter_MoveLiveScene_Orig(self, produceLive, isPlayCharacterFocusCamera, mtd);
}
// 进入 Live 时歌词默认显示:仅对每个 Presenter 实例的第一次设置强制 true,
// 之后(玩家的手动开关)原样透传,不再覆盖关闭操作。
std::unordered_set<void*> g_lyricsInitialForced{};
DEFINE_HOOK(void, LiveSceneModel_set_IsLyricsActive, (void* self, bool value, void* mtd)) {
return LiveSceneModel_set_IsLyricsActive_Orig(self, Config::dbgMode && Config::unlockAllLive ? true : value, mtd);
return LiveSceneModel_set_IsLyricsActive_Orig(self, value, mtd);
}
DEFINE_HOOK(void, LiveScenePresenter_SetLyricsActive, (void* self, bool value, void* mtd)) {
return LiveScenePresenter_SetLyricsActive_Orig(self, Config::dbgMode && Config::unlockAllLive ? true : value, mtd);
if (Config::dbgMode && Config::unlockAllLive && self && g_lyricsInitialForced.insert(self).second) {
value = true;
}
return LiveScenePresenter_SetLyricsActive_Orig(self, value, mtd);
}
DEFINE_HOOK(void, LiveSceneContentView_SetLyricsTextActive, (void* self, bool value, void* mtd)) {
return LiveSceneContentView_SetLyricsTextActive_Orig(self, Config::dbgMode && Config::unlockAllLive ? true : value, mtd);
return LiveSceneContentView_SetLyricsTextActive_Orig(self, value, mtd);
}
// std::string lastMusicId;