diff --git a/src/Backends/Platform/GLFW3.cpp b/src/Backends/Platform/GLFW3.cpp index 93135607..54101567 100644 --- a/src/Backends/Platform/GLFW3.cpp +++ b/src/Backends/Platform/GLFW3.cpp @@ -296,7 +296,7 @@ void Backend_GetKeyboardState(bool *out_keyboard_state) void Backend_ShowMessageBox(const char *title, const char *message) { // GLFW3 doesn't have a message box - printf("ShowMessageBox - '%s' - '%s'\n", title, message); + Backend_PrintInfo("ShowMessageBox - '%s' - '%s'\n", title, message); } ATTRIBUTE_FORMAT_PRINTF(1, 2) void Backend_PrintError(const char *format, ...) @@ -314,8 +314,8 @@ ATTRIBUTE_FORMAT_PRINTF(1, 2) void Backend_PrintInfo(const char *format, ...) va_list argumentList; va_start(argumentList, format); fputs("INFO: ", stdout); - vprintf(format, argumentList); - putchar('\n'); + vfprintf(stdout, format, argumentList); + fputc('\n', stdout); va_end(argumentList); } diff --git a/src/Backends/Platform/SDL2.cpp b/src/Backends/Platform/SDL2.cpp index 777fa0ff..948f9101 100644 --- a/src/Backends/Platform/SDL2.cpp +++ b/src/Backends/Platform/SDL2.cpp @@ -316,7 +316,7 @@ void Backend_GetKeyboardState(bool *out_keyboard_state) void Backend_ShowMessageBox(const char *title, const char *message) { - fprintf(stderr, "ShowMessageBox - '%s' - '%s'\n", title, message); + Backend_PrintInfo("ShowMessageBox - '%s' - '%s'\n", title, message); if (SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, message, window) != 0) Backend_PrintError("Was also unable to display a message box containing the error: %s", SDL_GetError()); @@ -337,8 +337,8 @@ ATTRIBUTE_FORMAT_PRINTF(1, 2) void Backend_PrintInfo(const char *format, ...) va_list argumentList; va_start(argumentList, format); fputs("INFO: ", stdout); - vprintf(format, argumentList); - putchar('\n'); + vfprintf(stdout, format, argumentList); + fputc('\n', stdout); va_end(argumentList); }