Output redirection in SDL 2

I use the SDL library in my project and I work on the Windows platform.

When I decided to move my project to SDL 2, I ran into a problem:

In SDL 1.2, there was an option to output the output from stdout / stderr to the console window, and not to the files, defining a macro NO_STDIO_REDIRECT. However, I did not find this macro in SDL 2.

Is there a way to print the output of SDL 2 to the console instead of the standard files?

+4
source share
1 answer

I suspect that it is NO_STDIO_REDIRECTno longer part of SDL2.

SDL_Log , .
SDL_LogSetOutputFunction :

, , :

void SDL_LogOutputFunction(void*           userdata,
                           int             category,
                           SDL_LogPriority priority,
                           const char*     message)

.

+4

All Articles