mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 13:37:56 +00:00
Added SDL_GetErrorMsg() to get the error message in a thread-safe way
This commit is contained in:
@@ -39,8 +39,6 @@ SDL_LookupString(const char *key)
|
||||
|
||||
/* Public functions */
|
||||
|
||||
static char *SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||
|
||||
int
|
||||
SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
|
||||
{
|
||||
@@ -192,7 +190,7 @@ main(int argc, char *argv[])
|
||||
/* This function has a bit more overhead than most error functions
|
||||
so that it supports internationalization and thread-safe errors.
|
||||
*/
|
||||
static char *
|
||||
char *
|
||||
SDL_GetErrorMsg(char *errstr, int maxlen)
|
||||
{
|
||||
SDL_error *error;
|
||||
|
||||
@@ -756,3 +756,4 @@
|
||||
#define SDL_JoystickSetVirtualBall SDL_JoystickSetVirtualBall_REAL
|
||||
#define SDL_JoystickSetVirtualButton SDL_JoystickSetVirtualButton_REAL
|
||||
#define SDL_JoystickSetVirtualHat SDL_JoystickSetVirtualHat_REAL
|
||||
#define SDL_GetErrorMsg SDL_GetErrorMsg_REAL
|
||||
|
||||
@@ -816,3 +816,4 @@ SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualAxis,(SDL_Joystick *a, int b, Sint16 c
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualBall,(SDL_Joystick *a, int b, Sint16 c, Sint16 d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualButton,(SDL_Joystick *a, int b, Uint8 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_JoystickSetVirtualHat,(SDL_Joystick *a, int b, Uint8 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(char*,SDL_GetErrorMsg,(char *a, int b),(a,b),return)
|
||||
|
||||
Reference in New Issue
Block a user