SDL_GetErrorMsg
Name
SDL_GetErrorMsg -- Gets SDL error string into the specified buffer.
Synopsis
#include "SDL.h" extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *, unsigned int); char *SDL_GetErrorMsg(char *errstr, unsigned int maxlen);
Description
SDL_GetErrorMsg stores up to maxlen bytes of the SDL error string into the buffer errstr.
Return Value
Returns errstr.
Example
char* buffer = SDL_GetErrorMsg((char*) malloc(16), 15);
printf("+----------------------+\n");
printf("| ERROR: |\n");
printf("| %-15s |\n", buffer);
printf("+----------------------+\n");
