blob: 95ca7c2cebdc46ce0d92fe6bd8e392d94d116e27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <SDL.h>
void die(void) {
while (1) {
// draw error message text?
SDL_Event e;
while (SDL_WaitEvent(&e)) SDL_Delay(1);
}
}
void sdl_error_assert(SDL_bool condition) {
if (!condition) {
SDL_LogCritical(SDL_LOG_CATEGORY_ERROR, "%s", SDL_GetError());
die();
}
}
|