fix: register the title-screen login patch so it actually applies on PC

GetPatchMethod only resolves patch methods from a fixed list of holder
classes; TitleScreenLoginPatches was missing, so the prefix failed with
[patch-fail] and a fresh PC client still looped on account creation.
Also log the real exception behind a failed sign-in redirect instead of
the TargetInvocationException wrapper.
This commit is contained in:
Alexa
2026-10-24 22:50:54 +03:00
parent 3880745efd
commit 9523525cb8
+4 -2
View File
@@ -679,7 +679,7 @@ public class Mod : MelonMod
private MethodInfo GetPatchMethod(string name) private MethodInfo GetPatchMethod(string name)
{ {
// Look in the core + feature patch holder classes. // Look in the core + feature patch holder classes.
foreach (var holder in new[] { typeof(UriPatches), typeof(AntiCheatPatches), typeof(AntiTamperPatches), typeof(FileHashCheckerPatches), typeof(ToxModPatches), typeof(TlsPatches), typeof(ScreenSharePatches), typeof(QuestTeamSize), typeof(RecRoyaleNight) }) foreach (var holder in new[] { typeof(UriPatches), typeof(AntiCheatPatches), typeof(AntiTamperPatches), typeof(FileHashCheckerPatches), typeof(ToxModPatches), typeof(TlsPatches), typeof(ScreenSharePatches), typeof(QuestTeamSize), typeof(RecRoyaleNight), typeof(TitleScreenLoginPatches) })
{ {
var m = holder.GetMethod(name, BindingFlags.Public | BindingFlags.Static); var m = holder.GetMethod(name, BindingFlags.Public | BindingFlags.Static);
if (m is not null) return m; if (m is not null) return m;
@@ -959,7 +959,9 @@ internal static class TitleScreenLoginPatches
} }
catch (Exception ex) catch (Exception ex)
{ {
Mod.Log.Warning($"[title] sign-in redirect failed, creating an account as Rec Room does: {ex.Message}"); // goToLogin.Invoke wraps the real failure in TargetInvocationException.
var cause = ex is TargetInvocationException { InnerException: not null } tie ? tie.InnerException! : ex;
Mod.Log.Warning($"[title] sign-in redirect failed, creating an account as Rec Room does: {cause.GetType().Name}: {cause.Message}");
return true; return true;
} }
} }