summaryrefslogtreecommitdiff
path: root/src/include/utils.h
blob: 7f43d8f2329c0bcf1854caa5bfde59f94eafd530 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Macro for error checking and logging */
#define MPL_CHECK(expr, fail_code, priority, ...) \
	if (! (expr)) { \
		SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION,priority,__VA_ARGS__); \
		SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION,priority, \
				"-> last SDL error : %s\n", SDL_GetError()); \
		fail_code; \
	}

#define MAX_PATH_LEN 255