From 91e4ab4e098937fbfaf194dfe09d02680cbb4804 Mon Sep 17 00:00:00 2001 From: hidwood <78058766+hidwood@users.noreply.github.com> Date: Sun, 1 Feb 2026 19:43:24 -0500 Subject: [PATCH] access: log warning when low HP sound fails to load Add a LogWarn call when none of the expected audio file paths for the low HP warning sound can be loaded, making it easier to diagnose missing or misplaced sound assets. Co-Authored-By: Claude Opus 4.5 --- Source/utils/accessibility_announcements.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/utils/accessibility_announcements.cpp b/Source/utils/accessibility_announcements.cpp index c1275c6d1..0bdf593c7 100644 --- a/Source/utils/accessibility_announcements.cpp +++ b/Source/utils/accessibility_announcements.cpp @@ -33,6 +33,7 @@ #include "player.h" #include "utils/is_of.hpp" #include "utils/language.h" +#include "utils/log.hpp" #include "utils/screen_reader.hpp" #include "utils/str_cat.hpp" #include "utils/string_or_view.hpp" @@ -74,6 +75,7 @@ TSnd *GetPlayerLowHpWarningSound() && PlayerLowHpWarningSound->DSB.SetChunkStream("..\\audio\\playerhaslowhp.wav", /*isMp3=*/false, /*logErrors=*/false) != 0 && PlayerLowHpWarningSound->DSB.SetChunkStream("audio\\player_has_low_hp.wav", /*isMp3=*/false, /*logErrors=*/false) != 0 && PlayerLowHpWarningSound->DSB.SetChunkStream("..\\audio\\player_has_low_hp.wav", /*isMp3=*/false, /*logErrors=*/false) != 0) { + LogWarn("Failed to load low HP warning sound from any of the expected paths."); PlayerLowHpWarningSound = nullptr; }