aboutsummaryrefslogtreecommitdiff
path: root/src/sdl/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdl/util.h')
-rw-r--r--src/sdl/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sdl/util.h b/src/sdl/util.h
new file mode 100644
index 0000000..8d7e130
--- /dev/null
+++ b/src/sdl/util.h
@@ -0,0 +1,13 @@
+#ifndef UTIL_H
+#define UTIL_H
+
+#define warn(...) do { \
+ SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
+} while (0)
+
+#define die(...) do { \
+ SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
+ exit(EXIT_FAILURE); \
+} while (0)
+
+#endif /* UTIL_H */