Renamed SDL_LogGetOutputFunction() and SDL_LogSetOutputFunction() to match SDL 3.0 naming convention

This commit is contained in:
Sam Lantinga
2024-03-17 09:50:28 -07:00
parent d8a54cd4f8
commit d65ae710a1
10 changed files with 41 additions and 17 deletions

View File

@@ -454,7 +454,7 @@ extern "C" {
* "1" - Log most events (other than the really spammy ones).
* "2" - Include mouse and finger motion events.
*
* This is generally meant to be used to debug SDL itself, but can be useful for application developers that need better visibility into what is going on in the event queue. Logged events are sent through SDL_Log(), which means by default they appear on stdout on most platforms or maybe OutputDebugString() on Windows, and can be funneled by the app with SDL_LogSetOutputFunction(), etc.
* This is generally meant to be used to debug SDL itself, but can be useful for application developers that need better visibility into what is going on in the event queue. Logged events are sent through SDL_Log(), which means by default they appear on stdout on most platforms or maybe OutputDebugString() on Windows, and can be funneled by the app with SDL_SetLogOutputFunction(), etc.
*
* This hint can be set anytime.
*/

View File

@@ -360,7 +360,7 @@ extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
*
* This function is called by SDL when there is new text to be logged.
*
* \param userdata what was passed as `userdata` to SDL_LogSetOutputFunction()
* \param userdata what was passed as `userdata` to SDL_SetLogOutputFunction()
* \param category the category of the message
* \param priority the priority of the message
* \param message the message being output
@@ -377,9 +377,9 @@ typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_LogSetOutputFunction
* \sa SDL_SetLogOutputFunction
*/
extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
extern DECLSPEC void SDLCALL SDL_GetLogOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
/**
* Replace the default log output function with one of your own.
@@ -389,9 +389,9 @@ extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *cal
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_LogGetOutputFunction
* \sa SDL_GetLogOutputFunction
*/
extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
extern DECLSPEC void SDLCALL SDL_SetLogOutputFunction(SDL_LogOutputFunction callback, void *userdata);
/* Ends C function definitions when using C++ */

View File

@@ -361,6 +361,10 @@
#define KMOD_SCROLL SDL_KMOD_SCROLL
#define KMOD_SHIFT SDL_KMOD_SHIFT
/* ##SDL_log.h */
#define SDL_LogGetOutputFunction SDL_GetLogOutputFunction
#define SDL_LogSetOutputFunction SDL_SetLogOutputFunction
/* ##SDL_mouse.h */
#define SDL_FreeCursor SDL_DestroyCursor
@@ -858,6 +862,10 @@
#define KMOD_SCROLL KMOD_SCROLL_renamed_SDL_KMOD_SCROLL
#define KMOD_SHIFT KMOD_SHIFT_renamed_SDL_KMOD_SHIFT
/* ##SDL_log.h */
#define SDL_LogGetOutputFunction SDL_LogGetOutputFunction_renamed_SDL_GetLogOutputFunction
#define SDL_LogSetOutputFunction SDL_LogSetOutputFunction_renamed_SDL_SetLogOutputFunction
/* ##SDL_mouse.h */
#define SDL_FreeCursor SDL_FreeCursor_renamed_SDL_DestroyCursor