diff options
Diffstat (limited to '')
-rw-r--r-- | include/video.hpp | 7 | ||||
-rw-r--r-- | include/wrapsdl2.hpp | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/include/video.hpp b/include/video.hpp index 3c2a238..2749d11 100644 --- a/include/video.hpp +++ b/include/video.hpp @@ -24,10 +24,9 @@ namespace wrapsdl2 { void open(); void close(); - - void show(); - void hide(); - void raise(); + inline void show() { SDL_ShowWindow(m_window); } + inline void hide() { SDL_HideWindow(m_window); } + inline void raise() { SDL_RaiseWindow(m_window); } // getters bool is_open(); diff --git a/include/wrapsdl2.hpp b/include/wrapsdl2.hpp index 847ed99..2f28890 100644 --- a/include/wrapsdl2.hpp +++ b/include/wrapsdl2.hpp @@ -9,11 +9,11 @@ namespace wrapsdl2 { void quit(void); namespace util { - constexpr bool sdl_bool(SDL_bool b) { + constexpr inline bool sdl_bool(SDL_bool b) { return b == SDL_TRUE; } - constexpr SDL_bool sdl_bool(bool b) { + constexpr inline SDL_bool sdl_bool(bool b) { return (b) ? SDL_TRUE : SDL_FALSE; } } |