]> git.localhorst.tv Git - orbi.git/blob - src/app/SDL.h
resolve data path relative to executable
[orbi.git] / src / app / SDL.h
1 #ifndef ORBI_SDL_H_
2 #define ORBI_SDL_H_
3
4 #include <memory>
5 #include <string>
6 #include <SDL.h>
7
8
9 namespace orbi {
10
11 class SDL {
12
13 public:
14         explicit SDL(Uint32 flags);
15         ~SDL();
16
17         SDL(const SDL &) = delete;
18         SDL &operator =(const SDL &) = delete;
19
20         std::string GetBasePath() const {
21                 std::unique_ptr<char, decltype(&SDL_free)> base{SDL_GetBasePath(), &SDL_free};
22                 return std::string(base.get());
23         }
24
25 };
26
27 }
28
29 #endif