Created
September 26, 2014 07:29
-
-
Save pervognsen/5a1adf83f6d7a2499337 to your computer and use it in GitHub Desktop.
SDL_DebugOutput
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* \brief Outputs an ASCII string that will be visible in a debugger. | |
* \note Uses OutputDebugStringA on Windows. Prints to stderr on all other platforms. | |
*/ | |
extern DECLSPEC void SDLCALL SDL_DebugOutput(const char *str); | |
void SDL_DebugOutput(const char *str) | |
{ | |
#if defined(__WIN32__) || defined(__WINRT__) | |
OutputDebugStringA(str); | |
#elif HAVE_STDIO_H | |
fputs(str, stderr); | |
#if __NACL__ | |
fflush(stderr); | |
#endif | |
#else | |
#error Not implemented on this platform. | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment