update SDL3 to latest commit

This commit is contained in:
Sasha Szpakowski
2024-10-06 20:30:44 -03:00
parent 1b0fdc338b
commit 9e5eb1b018
1426 changed files with 242456 additions and 103496 deletions
+18 -14
View File
@@ -39,15 +39,21 @@ SDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT32, SDL_MIN_SINT32 == ~0x7fffffff); /* Inste
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT32, SDL_MAX_UINT32 == 4294967295u);
SDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT32, SDL_MIN_UINT32 == 0);
SDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT64, SDL_MAX_SINT64 == 9223372036854775807ll);
SDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT64, SDL_MIN_SINT64 == ~0x7fffffffffffffffll); /* Instead of -9223372036854775808, which is treated as unsigned by compilers */
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT64, SDL_MAX_UINT64 == 18446744073709551615ull);
SDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT64, SDL_MAX_SINT64 == INT64_C(9223372036854775807));
SDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT64, SDL_MIN_SINT64 == ~INT64_C(0x7fffffffffffffff)); /* Instead of -9223372036854775808, which is treated as unsigned by compilers */
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT64, SDL_MAX_UINT64 == UINT64_C(18446744073709551615));
SDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT64, SDL_MIN_UINT64 == 0);
static int TestTypes(SDL_bool verbose)
static int TestTypes(bool verbose)
{
int error = 0;
if (badsize(sizeof(bool), 1)) {
if (verbose) {
SDL_Log("sizeof(bool) != 1, instead = %u\n", (unsigned int)sizeof(bool));
}
++error;
}
if (badsize(sizeof(Uint8), 1)) {
if (verbose) {
SDL_Log("sizeof(Uint8) != 1, instead = %u\n", (unsigned int)sizeof(Uint8));
@@ -79,7 +85,7 @@ static int TestTypes(SDL_bool verbose)
return error ? 1 : 0;
}
static int TestEndian(SDL_bool verbose)
static int TestEndian(bool verbose)
{
int error = 0;
Uint16 value = 0x1234;
@@ -360,7 +366,7 @@ static LL_Test LL_Tests[] = {
{ NULL, NULL, 0, 0, 0, 0 }
};
static int Test64Bit(SDL_bool verbose)
static int Test64Bit(bool verbose)
{
LL_Test *t;
int failed = 0;
@@ -386,10 +392,10 @@ static int Test64Bit(SDL_bool verbose)
return failed ? 1 : 0;
}
static int TestCPUInfo(SDL_bool verbose)
static int TestCPUInfo(bool verbose)
{
if (verbose) {
SDL_Log("CPU count: %d\n", SDL_GetCPUCount());
SDL_Log("Number of logical CPU cores: %d\n", SDL_GetNumLogicalCPUCores());
SDL_Log("CPU cache line size: %d\n", SDL_GetCPUCacheLineSize());
SDL_Log("AltiVec %s\n", SDL_HasAltiVec() ? "detected" : "not detected");
SDL_Log("MMX %s\n", SDL_HasMMX() ? "detected" : "not detected");
@@ -410,7 +416,7 @@ static int TestCPUInfo(SDL_bool verbose)
return 0;
}
static int TestAssertions(SDL_bool verbose)
static int TestAssertions(bool verbose)
{
SDL_assert(1);
SDL_assert_release(1);
@@ -441,7 +447,7 @@ static int TestAssertions(SDL_bool verbose)
int main(int argc, char *argv[])
{
int i;
SDL_bool verbose = SDL_TRUE;
bool verbose = true;
int status = 0;
SDLTest_CommonState *state;
@@ -451,9 +457,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
for (i = 1; i < argc;) {
int consumed;
@@ -461,7 +464,7 @@ int main(int argc, char *argv[])
consumed = SDLTest_CommonArg(state, i);
if (!consumed) {
if (SDL_strcmp(argv[i], "-q") == 0) {
verbose = SDL_FALSE;
verbose = false;
consumed = 1;
}
}
@@ -484,6 +487,7 @@ int main(int argc, char *argv[])
status += TestCPUInfo(verbose);
status += TestAssertions(verbose);
SDL_Quit();
SDLTest_CommonDestroyState(state);
return status;