mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 00:46:25 +00:00
Enable full object validation by default
Full object validation was always done before this hint and there are a number of shipping products that relied on this, so don't change it by default.
This commit is contained in:
@@ -691,9 +691,8 @@ extern "C" {
|
|||||||
* The variable can be set to the following values:
|
* The variable can be set to the following values:
|
||||||
*
|
*
|
||||||
* - "1": Enable fast parameter error checking, e.g. quick NULL checks, etc.
|
* - "1": Enable fast parameter error checking, e.g. quick NULL checks, etc.
|
||||||
* (default)
|
|
||||||
* - "2": Enable full parameter error checking, e.g. validating objects are
|
* - "2": Enable full parameter error checking, e.g. validating objects are
|
||||||
* the correct type, etc.
|
* the correct type, etc. (default)
|
||||||
*
|
*
|
||||||
* This hint can be set anytime.
|
* This hint can be set anytime.
|
||||||
*
|
*
|
||||||
|
@@ -141,12 +141,7 @@ bool SDL_object_validation = false;
|
|||||||
|
|
||||||
static void SDLCALL SDL_InvalidParamChecksChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
static void SDLCALL SDL_InvalidParamChecksChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
||||||
{
|
{
|
||||||
bool validation_enabled = false;
|
bool validation_enabled = true;
|
||||||
|
|
||||||
#ifdef SDL_ASSERT_INVALID_PARAMS
|
|
||||||
// Full validation is enabled by default
|
|
||||||
validation_enabled = true;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (hint) {
|
if (hint) {
|
||||||
switch (*hint) {
|
switch (*hint) {
|
||||||
|
Reference in New Issue
Block a user