add sdl error message on failed init

This commit is contained in:
Christopher A. Mosher
2015-07-11 23:44:50 -04:00
parent 130d2b4ac4
commit 825c748058

View File

@@ -29,6 +29,7 @@
GUI::GUI() { GUI::GUI() {
const int result = SDL_Init(SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO); const int result = SDL_Init(SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO);
if (result != 0) { if (result != 0) {
std::cerr << "Failed to initialize SDL: " << SDL_GetError() << std::endl;
throw GUI::NotInitException(); throw GUI::NotInitException();
} }