Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Source/Client/Desyncs/DeferredStackTracing.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using HarmonyLib;
using Multiplayer.Client.Patches;
using Multiplayer.Common;
Expand All @@ -25,6 +26,9 @@ static IEnumerable<MethodBase> TargetMethods()

public static int acc;

private static bool SupportsDeferredStackTracing =>
RuntimeInformation.ProcessArchitecture is Architecture.X64 or Architecture.X86;

public static void Postfix()
{
if (Native.LmfPtr == 0) return;
Expand All @@ -43,6 +47,7 @@ public static void Postfix()

public static bool ShouldAddStackTraceForDesyncLog()
{
if (!SupportsDeferredStackTracing) return false;
if (Multiplayer.Client == null) return false;
if (Multiplayer.settings.desyncTracingMode == DesyncTracingMode.None) return false;
if (Multiplayer.game == null) return false;
Expand Down
Loading