mirror of
https://git.chinosk6.cn/chinosk/gkms-localify-dmm.git
synced 2026-08-21 21:14:48 +07:00
修复dbgmode下歌词显示异常问题
进入 Live 时歌词默认显示(仅每个 Presenter 实例第一次设置时强制 true), 之后玩家手动开关原样透传,不再覆盖关闭操作
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user