Update SDL2 to version 2.28.1.

This commit is contained in:
Sasha Szpakowski
2023-08-31 22:21:03 -03:00
parent 99b2757fc5
commit a82fcdd079
1394 changed files with 313046 additions and 190617 deletions
+7 -8
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -25,8 +25,7 @@ quit(int rc)
exit(rc);
}
int
main(int argc, char *argv[])
int main(int argc, char *argv[])
{
int i, done;
SDL_Event event;
@@ -36,7 +35,7 @@ main(int argc, char *argv[])
/* Initialize test framework */
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
if (!state) {
if (state == NULL) {
return 1;
}
@@ -76,13 +75,13 @@ main(int argc, char *argv[])
/* Check for events */
while (SDL_PollEvent(&event)) {
if (event.type == SDL_DROPBEGIN) {
SDL_Log("Drop beginning on window %u", (unsigned int) event.drop.windowID);
SDL_Log("Drop beginning on window %u", (unsigned int)event.drop.windowID);
} else if (event.type == SDL_DROPCOMPLETE) {
SDL_Log("Drop complete on window %u", (unsigned int) event.drop.windowID);
SDL_Log("Drop complete on window %u", (unsigned int)event.drop.windowID);
} else if ((event.type == SDL_DROPFILE) || (event.type == SDL_DROPTEXT)) {
const char *typestr = (event.type == SDL_DROPFILE) ? "File" : "Text";
char *dropped_filedir = event.drop.file;
SDL_Log("%s dropped on window %u: %s", typestr, (unsigned int) event.drop.windowID, dropped_filedir);
SDL_Log("%s dropped on window %u: %s", typestr, (unsigned int)event.drop.windowID, dropped_filedir);
/* Normally you'd have to do this, but this is freed in SDLTest_CommonEvent() */
/*SDL_free(dropped_filedir);*/
}
@@ -93,7 +92,7 @@ main(int argc, char *argv[])
quit(0);
/* keep the compiler happy ... */
return(0);
return 0;
}
/* vi: set ts=4 sw=4 expandtab: */