--- /dev/null
+#include "SDL.h"
+
+#include <stdexcept>
+#include <string>
+
+
+namespace space {
+
+SDL::SDL(Uint32 flags) {
+ if (SDL_Init(flags) != 0) {
+ throw std::runtime_error(std::string("init SDL: ") + SDL_GetError());
+ }
+}
+
+SDL::~SDL() {
+ SDL_Quit();
+}
+
+}