mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 20:08:13 +00:00
Don't assert on API parameters
This causes lots of spam in test automation and it's not clear it's useful to developers. If we need this level of validation, we should add a log category for it.
This commit is contained in:
@@ -47,14 +47,12 @@ this should probably be removed at some point in the future. --ryan. */
|
||||
#define SDL_WINDOWRENDERDATA "_SDL_WindowRenderData"
|
||||
|
||||
#define CHECK_RENDERER_MAGIC(renderer, retval) \
|
||||
SDL_assert(renderer && renderer->magic == &renderer_magic); \
|
||||
if (!renderer || renderer->magic != &renderer_magic) { \
|
||||
SDL_SetError("Invalid renderer"); \
|
||||
return retval; \
|
||||
}
|
||||
|
||||
#define CHECK_TEXTURE_MAGIC(texture, retval) \
|
||||
SDL_assert(texture && texture->magic == &texture_magic); \
|
||||
if (!texture || texture->magic != &texture_magic) { \
|
||||
SDL_SetError("Invalid texture"); \
|
||||
return retval; \
|
||||
|
Reference in New Issue
Block a user