Add SDL_RenderDebugTextF & SDL_RenderDebugTextV

This should make it easier to quickly put important numbers and such on
the screen without having to format them into a string manually.
This commit is contained in:
williamistGitHub
2024-12-07 00:14:55 -05:00
committed by Ryan C. Gordon
parent 5608bf5866
commit 1d0e28a5b3
8 changed files with 126 additions and 2 deletions

View File

@@ -149,6 +149,16 @@ static void SDL_InitDynamicAPI(void);
va_end(ap); \
return result; \
} \
_static bool SDLCALL SDL_RenderDebugTextF##name(SDL_Renderer *renderer, float x, float y, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \
{ \
bool result; \
va_list ap; \
initcall; \
va_start(ap, fmt); \
result = jump_table.SDL_RenderDebugTextV(renderer, x, y, fmt, ap); \
va_end(ap); \
return result; \
} \
_static void SDLCALL SDL_Log##name(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) \
{ \
va_list ap; \