summaryrefslogtreecommitdiff
path: root/die.h
blob: 5048cedefde6cd10368e369da043a15a34ebf008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <SDL.h>

#include <stdlib.h>

#define die(...) (SDL_Log(__VA_ARGS__), abort())
static inline void sdl_error_assert(SDL_bool condition) {
	if (!condition) {
		SDL_Log("%s", SDL_GetError());
		// banish to hell forever
		abort();
	}
}
#define sdl_error_assert(c) (sdl_error_assert(c && SDL_TRUE))