Updates the SDL library to the latest standard bugfix release

This commit is contained in:
JeffR 2023-07-13 15:20:29 -05:00
parent cb766f2878
commit 083d2175ea
1280 changed files with 343926 additions and 179615 deletions

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
@ -22,12 +22,13 @@
#include "SDL_test_common.h"
#include "testutils.h"
#define WINDOW_WIDTH 640
#define WINDOW_HEIGHT 480
#define WINDOW_WIDTH 640
#define WINDOW_HEIGHT 480
static SDLTest_CommonState *state;
typedef struct {
typedef struct
{
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Texture *background;
@ -47,8 +48,7 @@ quit(int rc)
exit(rc);
}
void
Draw(DrawState *s)
void Draw(DrawState *s)
{
SDL_Rect viewport;
@ -78,8 +78,7 @@ Draw(DrawState *s)
SDL_RenderPresent(s->renderer);
}
void
loop()
void loop()
{
int i;
SDL_Event event;
@ -89,8 +88,9 @@ loop()
SDLTest_CommonEvent(state, &event, &done);
}
for (i = 0; i < state->num_windows; ++i) {
if (state->windows[i] == NULL)
if (state->windows[i] == NULL) {
continue;
}
Draw(&drawstates[i]);
}
#ifdef __EMSCRIPTEN__
@ -100,8 +100,7 @@ loop()
#endif
}
int
main(int argc, char *argv[])
int main(int argc, char *argv[])
{
int i;
int frames;
@ -112,7 +111,7 @@ main(int argc, char *argv[])
/* Initialize test framework */
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
if (!state) {
if (state == NULL) {
return 1;
}
@ -154,7 +153,7 @@ main(int argc, char *argv[])
/* Print out some timing information */
now = SDL_GetTicks();
if (now > then) {
double fps = ((double) frames * 1000) / (now - then);
double fps = ((double)frames * 1000) / (now - then);
SDL_Log("%2.2f frames per second\n", fps);
}