]> git.localhorst.tv Git - sdl-test7.git/blob - src/sdl/InitScreen.cpp
imported current version
[sdl-test7.git] / src / sdl / InitScreen.cpp
1 /*
2  * InitScreen.cpp
3  *
4  *  Created on: Apr 22, 2012
5  *      Author: holy
6  */
7
8 #include "InitScreen.h"
9
10 #include <stdexcept>
11
12 using std::runtime_error;
13
14
15 namespace sdl {
16
17 InitScreen::InitScreen(int width, int height, int bpp, Sint32 flags)
18 : screen(SDL_SetVideoMode(width, height, bpp, flags)) {
19         if (!screen) {
20                 throw runtime_error("failed to open screen");
21         }
22 }
23
24 InitScreen::~InitScreen(void) {
25
26 }
27
28 }