X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FEngine.cc;h=9ff5e1a8f1158188a4e58832a8a36a02c78ebcfb;hp=ccf2347c175e392af6baaa1b7748b44502b6dfa8;hb=8a1acac01b444dccf8b57cedf08392ada2e473c1;hpb=bffc879fc8ee8167bb123310d39fad4e2f426ffd diff --git a/src/Moof/Engine.cc b/src/Moof/Engine.cc index ccf2347..9ff5e1a 100644 --- a/src/Moof/Engine.cc +++ b/src/Moof/Engine.cc @@ -38,6 +38,7 @@ #include "Dispatcher.hh" #include "Engine.hh" #include "Event.hh" +#include "Exception.hh" #include "Log.hh" #include "Random.hh" #include "Settings.hh" @@ -59,19 +60,21 @@ public: mTimestep(0.01), mPrintFps(false) { -#if defined(_WIN32) || defined (_WIN64) || defined(__WIN32__) +#if defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__) if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0) #else if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTTHREAD) != 0) #endif { - logError("sdl is complaining: %s", SDL_GetError()); - throw Exception(Exception::SDL_ERROR); + const char* error = SDL_GetError(); + logError("sdl is complaining: %s", error); + throw Exception(ErrorCode::SDL_INIT, error); } if (FE_Init() != 0) { - logError("fast events error: %s", FE_GetError()); - throw Exception(Exception::SDL_ERROR); + const char* error = FE_GetError(); + logError("fast events error: %s", error); + throw Exception(ErrorCode::FASTEVENTS_INIT, error); } alutInit(&argc, argv);