Support for newer hxvlc compiling (#818)

This commit is contained in:
rich
2025-11-19 11:34:37 +07:00
committed by GitHub
parent b1de3b1896
commit b7dfce0f70
@@ -60,7 +60,9 @@ class VideoCutscene extends Cutscene {
add(video = new FlxVideoSprite());
video.antialiasing = true;
#if (hxvlc < version("2.0.0"))
video.autoPause = false; // Imma handle it better inside this class, mainly because of the pause menu - Nex
#end
video.bitmap.onEndReached.add(close);
video.bitmap.onFormatSetup.add(function() if (video.bitmap != null && video.bitmap.bitmapData != null) {
final width = video.bitmap.bitmapData.width;
@@ -205,6 +207,7 @@ class VideoCutscene extends Cutscene {
}
}
#if (hxvlc < version("2.0.0"))
@:dox(hide) override public function onFocus() {
if(FlxG.autoPause && !paused) video.resume();
super.onFocus();
@@ -214,6 +217,7 @@ class VideoCutscene extends Cutscene {
if(FlxG.autoPause && !paused) video.pause();
super.onFocusLost();
}
#end
public override function pauseCutscene() {
video.pause();