video offsets

This commit is contained in:
kade-github
2025-06-29 10:04:25 +03:00
committed by Mihai Alexandru
parent ec10f273b6
commit 70fbd200bd
@@ -2,6 +2,7 @@ package funkin.graphics.video;
#if hxvlc
import hxvlc.flixel.FlxVideoSprite;
import funkin.Preferences;
/**
* Not to be confused with FlxVideo, this is a hxvlc based video class
@@ -13,6 +14,13 @@ class FunkinVideoSprite extends FlxVideoSprite
public function new(x:Float = 0, y:Float = 0)
{
super(x, y);
// null safety fucking SUCKS
if (bitmap != null)
{
bitmap.onOpening.add(function():Void {
if (bitmap != null) bitmap.audioDelay = Preferences.globalOffset * 1000; // Microseconds
});
}
}
}
#end