mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
Updates the SDL library to the latest standard bugfix release
This commit is contained in:
parent
cb766f2878
commit
083d2175ea
1280 changed files with 343926 additions and 179615 deletions
|
|
@ -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: */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue