]> git.localhorst.tv Git - orbi.git/blob - src/app/IMG.cpp
resolve data path relative to executable
[orbi.git] / src / app / IMG.cpp
1 #include "IMG.h"
2
3 #include <stdexcept>
4 #include <string>
5 #include <SDL_image.h>
6
7
8 namespace orbi {
9
10 IMG::IMG(int flags) {
11         if (IMG_Init(flags) == 0) {
12                 throw std::runtime_error(std::string("init IMG: ") + IMG_GetError());
13         }
14 }
15
16 IMG::~IMG() {
17         IMG_Quit();
18 }
19
20 }