]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Engine.cc
big batch of changes
[chaz/yoink] / src / Moof / Engine.cc
index ccf2347c175e392af6baaa1b7748b44502b6dfa8..9ff5e1a8f1158188a4e58832a8a36a02c78ebcfb 100644 (file)
@@ -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);
 
This page took 0.023562 seconds and 4 git commands to generate.