Skip to content

Commit

Permalink
[F] Practice mode crash on AdvDemoProcess
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Nov 6, 2024
1 parent 1542f38 commit 478db15
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions AquaMai/ModKeyMap/PractiseMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using AquaMai.Fix;
using AquaMai.Helpers;
using AquaMai.Resources;
using AquaMai.Utils;
using HarmonyLib;
using Manager;
using MelonLoader;
using Monitor;
using Monitor.Game;
using Process;
Expand Down Expand Up @@ -200,6 +202,13 @@ public static void NotesManagerPostUpdateTimer(float msecStartGap)
[HarmonyPrefix]
public static bool NotesManagerPostUpdateTimer(bool ____isPlaying, Stopwatch ____stopwatch, ref float ____curMSec, ref float ____curMSecPre, float ____msecStartGap)
{
var stackTrace = new StackTrace(); // get call stack
var stackFrames = stackTrace.GetFrames(); // get method calls (frames)
if(stackFrames.Select(it => it.GetMethod().DeclaringType.Name).Contains("AdvDemoProcess"))
{
return true;
}

if (startGap != -1f)
{
____curMSec = startGap;
Expand Down

0 comments on commit 478db15

Please sign in to comment.