Skip to content

Commit fe0cf6a

Browse files
committed
[F] Mp4 movie not work
1 parent a2c76be commit fe0cf6a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

AquaMai.Mods/GameSystem/Assets/MovieLoader.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
using System.Collections.Generic;
22
using System.IO;
33
using AquaMai.Config.Attributes;
4+
using AquaMai.Core.Attributes;
45
using AquaMai.Core.Helpers;
56
using CriMana;
67
using HarmonyLib;
78
using MAI2.Util;
89
using Manager;
910
using MelonLoader;
11+
using Monitor;
1012
using Monitor.Game;
1113
using UnityEngine;
1214
using UnityEngine.Video;
@@ -162,6 +164,17 @@ public static void LoadLocalBgaAwake(GameObject ____movieMaskObj, int ___monitor
162164
}
163165
}
164166

167+
[HarmonyPrefix]
168+
[HarmonyPatch(typeof(GameMonitor), "SetMovieMaterial")]
169+
[EnableGameVersion(minVersion: 15500)]
170+
public static bool SetMovieMaterial(Material material, int ___monitorIndex)
171+
{
172+
# if DEBUG
173+
MelonLogger.Msg("SetMovieMaterial");
174+
# endif
175+
return _videoPlayers[___monitorIndex] == null;
176+
}
177+
165178
[HarmonyPostfix]
166179
[HarmonyPatch(typeof(MovieController), "GetMovieHeight")]
167180
public static void GetMovieHeightPostfix(ref uint __result)

0 commit comments

Comments
 (0)