Skip to content

Commit dc33f54

Browse files
committed
show accurate resolution come back.
1 parent 1fe49ac commit dc33f54

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Tweak.xm

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ void hooked_TitleSceneController_SetPlayerId(void* self, Unity::System_String* p
476476
typedef void (*original_FesLiveSettingsView_InitButtons_t)(void* self);
477477
original_FesLiveSettingsView_InitButtons_t original_FesLiveSettingsView_InitButtons = nullptr;
478478
void hooked_FesLiveSettingsView_InitButtons(void* self) {
479+
original_FesLiveSettingsView_InitButtons(self);
480+
479481
IL2CPP::CClass* pSelf = reinterpret_cast<IL2CPP::CClass*>(self);
480482

481483
IL2CPP::CClass* qualityLowRadioButton = pSelf->GetMemberValue<IL2CPP::CClass*>("qualityLowRadioButton");
@@ -500,8 +502,6 @@ void hooked_FesLiveSettingsView_InitButtons(void* self) {
500502
[qualityConfig[@"Story.Quality.High.Factor"] floatValue]
501503
] UTF8String]
502504
));
503-
504-
original_FesLiveSettingsView_InitButtons(self);
505505
}
506506

507507
// Tecotec.QuestLive.Live.QuestLiveHeartObject.PlayThrowAnimation
@@ -831,12 +831,20 @@ BOOL hooked_didFinishLaunchingWithOptions(id self, SEL _cmd, UIApplication *appl
831831
NSLog(@"[IL2CPP Tweak] Successfully hooked set_targetFrameRate!");
832832
}
833833

834-
if (!Unity2022_3_62F && qualityConfig[@"Enable.LiveStreamQualityHook"] && qualityConfig[@"Enable.StoryQualityHook"]) {
835-
targetAddress = IL2CPP::Class::Utils::GetMethodPointer(
836-
"Tecotec.FesLiveSettingsView",
837-
"InitButtons",
838-
0
839-
);
834+
if (qualityConfig[@"Enable.LiveStreamQualityHook"] && qualityConfig[@"Enable.StoryQualityHook"]) {
835+
if (Unity2022_3_62F) {
836+
targetAddress = IL2CPP::Class::Utils::GetMethodPointer(
837+
"Tecotec.FesLiveSettingsView",
838+
"Initialize",
839+
0
840+
);
841+
} else {
842+
targetAddress = IL2CPP::Class::Utils::GetMethodPointer(
843+
"Tecotec.FesLiveSettingsView",
844+
"InitButtons",
845+
0
846+
);
847+
}
840848

841849
if (targetAddress) {
842850
MSHookFunction_p(

0 commit comments

Comments
 (0)