update SDL3 from 3.2.20 to 3.4.2

This commit is contained in:
Sven Balzer
2026-04-01 18:25:03 +02:00
parent 1daf4d79f1
commit 05b19704f8
1626 changed files with 124218 additions and 191491 deletions
+16 -1
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2026 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
@@ -117,6 +117,8 @@ static void loop(void *arg)
struct mouse_loop_data *loop_data = (struct mouse_loop_data *)arg;
SDL_Event event;
SDL_Renderer *renderer = loop_data->renderer;
float fx, fy;
SDL_MouseButtonFlags flags;
/* Check for events */
while (SDL_PollEvent(&event)) {
@@ -211,6 +213,10 @@ static void loop(void *arg)
break;
case SDL_EVENT_KEY_DOWN:
if (event.key.scancode == SDL_SCANCODE_ESCAPE) {
loop_data->done = true;
break;
}
if (event.key.key == SDLK_C) {
int x, y, w, h;
SDL_GetWindowPosition(window, &x, &y);
@@ -265,6 +271,10 @@ static void loop(void *arg)
DrawObject(renderer, active);
}
flags = SDL_GetGlobalMouseState(&fx, &fy);
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
SDL_RenderDebugTextFormat(renderer, 0, 0, "Global Mouse State: x=%f y=%f flags=%" SDL_PRIu32, fx, fy, flags);
SDL_RenderPresent(renderer);
#ifdef SDL_PLATFORM_EMSCRIPTEN
@@ -335,6 +345,11 @@ int main(int argc, char *argv[])
}
#endif
while (active) {
Object *next = active->next;
SDL_free(active);
active = next;
}
SDL_DestroyRenderer(loop_data.renderer);
SDL_DestroyWindow(window);