summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorcitrons <citrons@mondecitronne.com>2023-10-12 16:32:32 -0500
committercitrons <citrons@mondecitronne.com>2023-10-12 16:32:32 -0500
commitd1ba7e3713cd999635104591295d1923235c9289 (patch)
treef639da0345b422b2702e4132ca5315669be7d240 /main.c
parent818732592abbf3b2a2c8e3d66cdd056a104bade1 (diff)
make error handling worse
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/main.c b/main.c
index 2443d7a..39eb282 100644
--- a/main.c
+++ b/main.c
@@ -68,19 +68,22 @@ static int run() {
int main(int argc, char *argv[]) {
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
- SDL_Log("error initializing SDL: %s", SDL_GetError());
+ SDL_LogCritical(SDL_LOG_CATEGORY_ERROR,
+ "error initializing SDL: %s", SDL_GetError());
return 1;
}
win = SDL_CreateWindow("find",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 960, 720,
SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
if (!win) {
- SDL_Log("error creating window: %s", SDL_GetError());
+ SDL_LogCritical(SDL_LOG_CATEGORY_ERROR,
+ "error creating window: %s", SDL_GetError());
return 1;
}
rend = SDL_CreateRenderer(win, -1, SDL_RENDERER_PRESENTVSYNC);
if (!rend) {
- SDL_Log("error creating renderer: %s", SDL_GetError());
+ SDL_LogCritical(SDL_LOG_CATEGORY_ERROR,
+ "error creating renderer: %s", SDL_GetError());
return 1;
}