From 6b338eac9f9ba476300dc037e91e3bd17b1a6693 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Tue, 17 Jan 2023 21:49:07 +0000 Subject: [PATCH] Display path in `LoadAudioFile` error dialog --- Source/engine/sound.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/engine/sound.cpp b/Source/engine/sound.cpp index 7ad79d740..e2c0a2ae4 100644 --- a/Source/engine/sound.cpp +++ b/Source/engine/sound.cpp @@ -54,8 +54,9 @@ bool LoadAudioFile(const char *path, bool stream, bool errorDialog, SoundSample if (result.SetChunkStream(GetMp3Path(path), /*isMp3=*/true, /*logErrors=*/false) != 0) { SDL_ClearError(); if (result.SetChunkStream(path, /*isMp3=*/false, /*logErrors=*/true) != 0) { - if (errorDialog) - ErrSdl(); + if (errorDialog) { + ErrDlg("Failed to load audio file", StrCat(path, "\n", SDL_GetError(), "\n"), __FILE__, __LINE__); + } return false; } }