Skip to content
Closed
Changes from 1 commit
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
30 changes: 12 additions & 18 deletions AquaMai.Mods/GameSystem/Assets/MovieLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,31 +197,25 @@ public static void GetMovieWidthPostfix(ref uint __result)

[HarmonyPostfix]
[HarmonyPatch(typeof(MovieController), "Play")]
public static void Play(int frame)
public static void Play(int moviePlayerIndex, int frame)
{
foreach (var player in _videoPlayers)
{
if (player == null) continue;
player.frame = frame;
player.Play();
}
if (_videoPlayers[moviePlayerIndex] == null) continue;
_videoPlayers[moviePlayerIndex].frame = frame;
_videoPlayers[moviePlayerIndex].Play();
}

[HarmonyPostfix]
[HarmonyPatch(typeof(MovieController), "Pause")]
public static void Pause(bool pauseFlag)
public static void Pause(int moviePlayerIndex, bool pauseFlag)
{
foreach (var player in _videoPlayers)
if (_videoPlayers[moviePlayerIndex] == null) continue;
if (pauseFlag)
{
if (player == null) continue;
if (pauseFlag)
{
player.Pause();
}
else
{
player.Play();
}
_videoPlayers[moviePlayerIndex].Pause();
}
else
{
_videoPlayers[moviePlayerIndex].Play();
}
}

Expand Down