summaryrefslogtreecommitdiffstats
path: root/include/wrapsdl2.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2019-01-21 15:26:43 +0100
committerNao Pross <naopross@thearcway.org>2019-01-21 15:27:10 +0100
commit46a28a711fd730828ae5596f68ef3510a20b7b31 (patch)
tree95e1d89c6213fbb140e9b9c767eccdabab2eb369 /include/wrapsdl2.hpp
parentAdd window test (diff)
downloadlibwsdl2-46a28a711fd730828ae5596f68ef3510a20b7b31.tar.gz
libwsdl2-46a28a711fd730828ae5596f68ef3510a20b7b31.zip
Make window_test threaded
Diffstat (limited to '')
-rw-r--r--include/wrapsdl2.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/wrapsdl2.hpp b/include/wrapsdl2.hpp
index 993a704..847ed99 100644
--- a/include/wrapsdl2.hpp
+++ b/include/wrapsdl2.hpp
@@ -1,9 +1,23 @@
#pragma once
+extern "C" {
+#include <SDL2/SDL.h>
+}
+
namespace wrapsdl2 {
bool initialize(void);
void quit(void);
+
+ namespace util {
+ constexpr bool sdl_bool(SDL_bool b) {
+ return b == SDL_TRUE;
+ }
+
+ constexpr SDL_bool sdl_bool(bool b) {
+ return (b) ? SDL_TRUE : SDL_FALSE;
+ }
+ }
// tool functions
- void delay()
+ void delay(unsigned ms);
} \ No newline at end of file