videos: initialize hxvlc's handle early for faster loading speeds.

This commit is contained in:
MAJigsaw77
2025-05-20 10:32:54 -07:00
committed by Kade
parent 0d5fd4a0c5
commit c462a5f8d0
+8
View File
@@ -9,6 +9,9 @@ import funkin.util.logging.CrashHandler;
import funkin.ui.debug.MemoryCounter;
import funkin.save.Save;
import haxe.ui.Toolkit;
#if hxvlc
import hxvlc.util.Handle;
#end
import openfl.display.FPS;
import openfl.display.Sprite;
import openfl.events.Event;
@@ -117,6 +120,11 @@ class Main extends Sprite
// George recommends binding the save before FlxGame is created.
Save.load();
#if hxvlc
// Initialize hxvlc's Handle here so the videos are loading faster.
Handle.init();
#end
// Don't call anything from the preferences until the save is loaded!
#if web
// set this variable (which is a function) from the lime version at lime/_internal/backend/html5/HTML5Application.hx