Skip to content

Commit

Permalink
[F] Compatibility for modified package
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Oct 7, 2024
1 parent 587993c commit 6d78235
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions AquaMai/AquaMai.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>SDGA145
DEBUG</DefineConstants>
<DefineConstants>DEBUG</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
Expand Down
10 changes: 5 additions & 5 deletions AquaMai/Fix/DebugFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static bool Pause
return PolyFill.isPause;
}

return (bool)_debugFeatureType.GetField("_debugPause", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(_debugFeatureOriginal);
return (bool)_debugFeatureType.GetField("_debugPause", BindingFlags.Instance | BindingFlags.Public).GetValue(_debugFeatureOriginal);
}

set
Expand All @@ -66,7 +66,7 @@ public static bool Pause
}
else
{
_debugFeatureType.GetField("_debugPause", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(_debugFeatureOriginal, value);
_debugFeatureType.GetField("_debugPause", BindingFlags.Instance | BindingFlags.Public).SetValue(_debugFeatureOriginal, value);
}

SoundManager.PauseMusic(value);
Expand All @@ -84,7 +84,7 @@ public static void Seek(int msec)
}
else
{
_debugFeatureType.GetMethod("DebugTimeSkip", BindingFlags.Instance | BindingFlags.NonPublic)?.Invoke(_debugFeatureOriginal, new object[] { msec });
_debugFeatureType.GetMethod("DebugTimeSkip", BindingFlags.Instance | BindingFlags.Public).Invoke(_debugFeatureOriginal, new object[] { msec });
}
}

Expand All @@ -97,7 +97,7 @@ public static double CurrentPlayMsec
return PolyFill.timer;
}

return (double)_debugFeatureType.GetField("_debugTimer", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(_debugFeatureOriginal);
return (double)_debugFeatureType.GetField("_debugTimer", BindingFlags.Instance | BindingFlags.Public).GetValue(_debugFeatureOriginal);
}
set
{
Expand All @@ -107,7 +107,7 @@ public static double CurrentPlayMsec
}
else
{
_debugFeatureType.GetField("_debugTimer", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(_debugFeatureOriginal, value);
_debugFeatureType.GetField("_debugTimer", BindingFlags.Instance | BindingFlags.Public).SetValue(_debugFeatureOriginal, value);
}

Seek(0);
Expand Down

0 comments on commit 6d78235

Please sign in to comment.