--- /dev/null
+/*
+ * InitSDL.cpp
+ *
+ * Created on: Apr 22, 2012
+ * Author: holy
+ */
+
+#include "InitSDL.h"
+
+#include <stdexcept>
+
+using std::runtime_error;
+
+
+namespace sdl {
+
+InitSDL::InitSDL(Uint32 flags) {
+ if (SDL_Init(flags) != 0) {
+ throw runtime_error("failed to initialize SDL");
+ }
+}
+
+InitSDL::~InitSDL(void) {
+ SDL_Quit();
+}
+
+}