Removed the limit on the size of the SDL error message

Also added SDL_GetOriginalMemoryFunctions()

Fixes https://github.com/libsdl-org/SDL/issues/5795
This commit is contained in:
Sam Lantinga
2022-06-27 16:59:50 -07:00
parent f25b4b2774
commit cbd0187475
11 changed files with 126 additions and 16 deletions

View File

@@ -5328,6 +5328,25 @@ static struct
real_malloc, real_calloc, real_realloc, real_free, { 0 }
};
void SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func,
SDL_calloc_func *calloc_func,
SDL_realloc_func *realloc_func,
SDL_free_func *free_func)
{
if (malloc_func) {
*malloc_func = real_malloc;
}
if (calloc_func) {
*calloc_func = real_calloc;
}
if (realloc_func) {
*realloc_func = real_realloc;
}
if (free_func) {
*free_func = real_free;
}
}
void SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
SDL_calloc_func *calloc_func,
SDL_realloc_func *realloc_func,