Replace printf/fprintf with own print_info() / print_error() using SDL_log
[mercenary-reloaded.git] / src / libsdl / opengl.c
index 40cf6bb..ae3eaca 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <errno.h>
+#include "print.h"
 #include "opengl.h"
 #include <GL/glew.h>
 
@@ -43,7 +44,7 @@ int init_opengl(int _image_width, int _image_height)
                ;
        text_rgb = calloc(texture_size * texture_size * 10, 3);
        if (!text_rgb) {
-               fprintf(stderr, "Failed to allocate texture\n");
+               print_error("Failed to allocate texture\n");
                rc = -ENOMEM;
                goto error;
        }