diff options
| author | citrons <citrons@mondecitronne.com> | 2023-10-12 16:32:32 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2023-10-12 16:32:32 -0500 |
| commit | d1ba7e3713cd999635104591295d1923235c9289 (patch) | |
| tree | f639da0345b422b2702e4132ca5315669be7d240 /main.c | |
| parent | 818732592abbf3b2a2c8e3d66cdd056a104bade1 (diff) | |
make error handling worse
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; } |
