From cffa899e037e9c62698e89dd53d8485bab8c9f43 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 26 Mar 2015 14:51:47 -0300 Subject: [PATCH] Explicitly mention SDL in the error message caused by SDL subsystem initialization failure. --- changes.txt | 2 +- src/modules/event/sdl/Event.cpp | 2 +- src/modules/joystick/sdl/JoystickModule.cpp | 2 +- src/modules/timer/sdl/Timer.cpp | 2 +- src/modules/window/sdl/Window.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/changes.txt b/changes.txt index cdd303250..01658f5dc 100644 --- a/changes.txt +++ b/changes.txt @@ -75,7 +75,7 @@ Released: N/A * Updated the compatibility warning notice to use a message box. * Updated the compatibility warning notice to display before main.lua is loaded. * Updated love.keypressed to be love.keypressed(key, scancode, isrepeat). - * Updated love.keyreleased to be love.keyreleleased(key, scancode). + * Updated love.keyreleased to be love.keyreleased(key, scancode). * Updated love.math.setRandomSeed and RandomGenerator:setSeed to produce better results for the first few random() calls. * Updated Source methods that deal with spatial audio to error rather than failing silently if the Source isn't mono. * Updated ImageFonts to no longer treat separator pixels as spacing. diff --git a/src/modules/event/sdl/Event.cpp b/src/modules/event/sdl/Event.cpp index ddae084fe..3eba758ed 100644 --- a/src/modules/event/sdl/Event.cpp +++ b/src/modules/event/sdl/Event.cpp @@ -97,7 +97,7 @@ const char *Event::getName() const Event::Event() { if (SDL_InitSubSystem(SDL_INIT_EVENTS) < 0) - throw love::Exception("%s", SDL_GetError()); + throw love::Exception("Could not initialize SDL events subsystem (%s)", SDL_GetError()); SDL_AddEventWatch(watchAppEvents, this); } diff --git a/src/modules/joystick/sdl/JoystickModule.cpp b/src/modules/joystick/sdl/JoystickModule.cpp index 8e26f6ba7..96ff8d9c5 100644 --- a/src/modules/joystick/sdl/JoystickModule.cpp +++ b/src/modules/joystick/sdl/JoystickModule.cpp @@ -42,7 +42,7 @@ namespace sdl JoystickModule::JoystickModule() { if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) < 0) - throw love::Exception("%s", SDL_GetError()); + throw love::Exception("Could not initialize SDL joystick subsystem (%s)", SDL_GetError()); // Initialize any joysticks which are already connected. for (int i = 0; i < SDL_NumJoysticks(); i++) diff --git a/src/modules/timer/sdl/Timer.cpp b/src/modules/timer/sdl/Timer.cpp index 532e3dc1e..eb5e0c8ae 100644 --- a/src/modules/timer/sdl/Timer.cpp +++ b/src/modules/timer/sdl/Timer.cpp @@ -36,7 +36,7 @@ Timer::Timer() { // Init the SDL timer system (needed for SDL_Delay.) if (SDL_InitSubSystem(SDL_INIT_TIMER) < 0) - throw love::Exception("%s", SDL_GetError()); + throw love::Exception("Could not initialize SDL timer subsystem (%s)", SDL_GetError()); } Timer::~Timer() diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 66d165711..b11de66da 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -55,7 +55,7 @@ Window::Window() , displayedContextError(false) { if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) - throw love::Exception("%s", SDL_GetError()); + throw love::Exception("Could not initialize SDL video subsystem (%s)", SDL_GetError()); } Window::~Window()