From b2354d68c01da994c3246e13cacacefcb92f672a Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Mon, 13 Feb 2023 11:41:24 +0100 Subject: [PATCH] Added log message when sdl2 init fails --- src/SDLWrapper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SDLWrapper.cpp b/src/SDLWrapper.cpp index 999dbca..86feec6 100644 --- a/src/SDLWrapper.cpp +++ b/src/SDLWrapper.cpp @@ -4,7 +4,9 @@ using namespace sc::gui; SDLWrapper::SDLWrapper() { - SDL_Init(SDL_INIT_VIDEO); + if (SDL_Init(SDL_INIT_VIDEO)) { + SDL_Log("SDL_Init(): %s", SDL_GetError()); + } } SDLWrapper::~SDLWrapper() {