Update SDL3 from 3.2.4 to 3.2.20

This commit is contained in:
Sven Balzer
2025-08-27 21:24:05 +02:00
parent 6283160467
commit ad651462df
332 changed files with 20334 additions and 4852 deletions
+41 -14
View File
@@ -368,14 +368,12 @@ static size_t SDL_ScanUnsignedLongLongInternal(const char *text, int count, int
negative = *text == '-';
++text;
}
if ((radix == 0 || radix == 16) && *text == '0' && text[1] != '\0') {
if ((radix == 0 || radix == 16) && *text == '0' && (text[1] == 'x' || text[1] == 'X')) {
text += 2;
radix = 16;
} else if (radix == 0 && *text == '0' && (text[1] >= '0' && text[1] <= '9')) {
++text;
if (*text == 'x' || *text == 'X') {
radix = 16;
++text;
} else if (radix == 0) {
radix = 8;
}
radix = 8;
} else if (radix == 0) {
radix = 10;
}
@@ -462,14 +460,12 @@ static size_t SDL_ScanUnsignedLongLongInternalW(const wchar_t *text, int count,
negative = *text == '-';
++text;
}
if ((radix == 0 || radix == 16) && *text == '0') {
if ((radix == 0 || radix == 16) && *text == '0' && (text[1] == 'x' || text[1] == 'X')) {
text += 2;
radix = 16;
} else if (radix == 0 && *text == '0' && (text[1] >= '0' && text[1] <= '9')) {
++text;
if (*text == 'x' || *text == 'X') {
radix = 16;
++text;
} else if (radix == 0) {
radix = 8;
}
radix = 8;
} else if (radix == 0) {
radix = 10;
}
@@ -1448,6 +1444,7 @@ static bool CharacterMatchesSet(char c, const char *set, size_t set_len)
// NOLINTNEXTLINE(readability-non-const-parameter)
int SDL_vsscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, va_list ap)
{
const char *start = text;
int result = 0;
if (!text || !*text) {
@@ -1718,6 +1715,36 @@ int SDL_vsscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, va_li
}
done = true;
break;
case 'n':
switch (inttype) {
case DO_SHORT:
{
short *valuep = va_arg(ap, short *);
*valuep = (short)(text - start);
} break;
case DO_INT:
{
int *valuep = va_arg(ap, int *);
*valuep = (int)(text - start);
} break;
case DO_LONG:
{
long *valuep = va_arg(ap, long *);
*valuep = (long)(text - start);
} break;
case DO_LONGLONG:
{
long long *valuep = va_arg(ap, long long *);
*valuep = (long long)(text - start);
} break;
case DO_SIZE_T:
{
size_t *valuep = va_arg(ap, size_t *);
*valuep = (size_t)(text - start);
} break;
}
done = true;
break;
case '[':
{
const char *set = fmt + 1;