From 1c851f022cda67388af69ce5756fa6c431195f48 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 9 Oct 2021 19:08:06 +0200 Subject: [PATCH] Show SDL error message if no context was created --- src/openrct2-ui/Ui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/Ui.cpp b/src/openrct2-ui/Ui.cpp index 410fb23076..1de7da484b 100644 --- a/src/openrct2-ui/Ui.cpp +++ b/src/openrct2-ui/Ui.cpp @@ -61,9 +61,9 @@ int main(int argc, const char** argv) { audioContext = ToShared(CreateAudioContext()); } - catch (const SDLException&) + catch (const SDLException& e) { - log_warning("Failed to create audio context. Using dummy audio context."); + log_warning("Failed to create audio context. Using dummy audio context. Error message was: %s", e.what()); audioContext = ToShared(CreateDummyAudioContext()); } auto uiContext = ToShared(CreateUiContext(env));