mirror of
https://github.com/encounter/SDL.git
synced 2025-12-16 16:37:09 +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:
@@ -135,7 +135,6 @@ static SDL_VideoDevice *_this = NULL;
|
||||
SDL_UninitializedVideo(); \
|
||||
return retval; \
|
||||
} \
|
||||
SDL_assert(window && window->magic == &_this->window_magic); \
|
||||
if (!window || window->magic != &_this->window_magic) { \
|
||||
SDL_SetError("Invalid window"); \
|
||||
return retval; \
|
||||
@@ -146,8 +145,6 @@ static SDL_VideoDevice *_this = NULL;
|
||||
SDL_UninitializedVideo(); \
|
||||
return retval; \
|
||||
} \
|
||||
SDL_assert(_this->displays != NULL); \
|
||||
SDL_assert(displayIndex >= 0 && displayIndex < _this->num_displays); \
|
||||
if (displayIndex < 0 || displayIndex >= _this->num_displays) { \
|
||||
SDL_SetError("displayIndex must be in the range 0 - %d", \
|
||||
_this->num_displays - 1); \
|
||||
|
||||
Reference in New Issue
Block a user