Linux fix w/ config. Might implement properly later.
This commit is contained in:
29
Patches/Internals/DeviceIdBuilder.cs
Normal file
29
Patches/Internals/DeviceIdBuilder.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using HarmonyLib;
|
||||
using Il2CppInterop.Runtime.InteropTypes.Arrays;
|
||||
using undead_universal_patch_il2cpp.Core;
|
||||
using undead_universal_patch_il2cpp.Core.Config;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Patches.Internals;
|
||||
|
||||
[HarmonyPatch]
|
||||
public class DeviceIdBuilder
|
||||
{
|
||||
static PatchTypesResult typesResult = Util.ConfigPreparePatchTypes(
|
||||
PatchConfig.ProtonDeviceIdFix,
|
||||
"Proton quickfix for device ID errors",
|
||||
"RecRoom.Utils.DeviceIdBuilder",
|
||||
"CalculateOtherDeviceId"
|
||||
);
|
||||
|
||||
static MethodBase TargetMethod() => typesResult.Method;
|
||||
static bool Prepare() => typesResult.Success;
|
||||
|
||||
static bool Prefix(ref Il2CppStructArray<byte> __result)
|
||||
{
|
||||
Util.ConditionalDebug("Device ID patched");
|
||||
__result = new Il2CppStructArray<byte>(Encoding.UTF8.GetBytes("Wine/Proton"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user