#include "Dispatcher.hh"
#include "Engine.hh"
#include "Event.hh"
+#include "Exception.hh"
#include "Log.hh"
#include "Random.hh"
#include "Settings.hh"
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);