Replace printf/fprintf with own print_info() / print_error() using SDL_log
[mercenary-reloaded.git] / src / libkeyboard / keyboard.c
index 5643c31..f6d5cce 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#include "../libsdl/print.h"
 #include "keyboard.h"
 
 //#define DEBUG_KEYS
@@ -120,7 +121,7 @@ void set_key(const char *key, int down)
                }
        }
        if (code < 0 || code >= 0x80) {
-               fprintf(stderr, "Key code '%s' unknown, please fix!\n", key);
+               print_error("Key code '%s' unknown, please fix!\n", key);
                return;
        }
 
@@ -141,7 +142,7 @@ void set_key(const char *key, int down)
        }
 
        if (buffer_len == buffer_size) {
-               fprintf(stderr, "keyboard buffer overflow\n");
+               print_error("keyboard buffer overflow\n");
                return;
        }