src/context.c

changeset 92
78ce93fb46e5
parent 88
6234b7ea48f3
--- a/src/context.c	Tue Apr 22 19:36:27 2025 +0200
+++ b/src/context.c	Wed Apr 23 23:43:45 2025 +0200
@@ -79,11 +79,11 @@
     // initialize SDL
     const int supported_img_flags = IMG_INIT_PNG | IMG_INIT_JPG;
     if (SDL_Init(SDL_INIT_VIDEO) < 0) {
-        asc_error(SDL_GetError());
+        asc_error("Failed to initialize SDL: %s", SDL_GetError());
     } else if (TTF_Init() < 0) {
-        asc_error(TTF_GetError());
+        asc_error("Failed to initialize SDL_ttf: %s", TTF_GetError());
     } else if (IMG_Init(supported_img_flags) != supported_img_flags) {
-        asc_error(IMG_GetError());
+        asc_error("Failed to initialize SDL_img: %s", IMG_GetError());
     }
     SDL_ClearError();
     asc_context.total_nanos = asc_nanos();

mercurial