From bb46b699ebd969c46daad84b2a3cfb52d552ff01 Mon Sep 17 00:00:00 2001 From: sector-a <82838084+sector-a@users.noreply.github.com> Date: Thu, 17 Apr 2025 19:53:11 +0300 Subject: [PATCH] Prevent SoundTray crash and Update Assets --- assets | 2 +- source/funkin/InitState.hx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets b/assets index 6bcd2a806..5fcd39dd6 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 6bcd2a80628feb08571786b37ce6ab4ddc5328be +Subproject commit 5fcd39dd640333c6d1dc844eae64e57b896f1e76 diff --git a/source/funkin/InitState.hx b/source/funkin/InitState.hx index 7c755b9cf..964345616 100644 --- a/source/funkin/InitState.hx +++ b/source/funkin/InitState.hx @@ -90,8 +90,10 @@ class InitState extends FlxState funkin.util.WindowUtil.initTracy(); #end + #if FEATURE_HAPTICS // Setup Haptic feedback extension.haptics.Haptic.initialize(); + #end #if FEATURE_ADMOB_ADS // Setup Admob @@ -115,7 +117,7 @@ class InitState extends FlxState // but that makes our soundtray not show up on init if we have the game muted. // We set it to active so it at least calls it's update function once (see FlxGame.onEnterFrame(), it's called there) // and also see FunkinSoundTray.update() to see what we do and how we check if we are muted or not - // FlxG.game.soundTray.active = true; + if (FlxG.game.soundTray != null) FlxG.game.soundTray.active = true; // Set the game to a lower frame rate while it is in the background. FlxG.game.focusLostFramerate = 30;