From 9402ff666f5827c077ae385d90d07c443f30331a Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 5 Oct 2024 15:44:29 +0200 Subject: [PATCH] more sdl upgrade changes --- external/sdl/CMakeLists.txt | 1 + flake.lock | 16 ++++++++-------- flake.nix | 4 ++-- src/image_loader_sdl_bmp.cpp | 4 ++-- src/image_loader_sdl_image.cpp | 4 ++-- src/sdl_clipboard_utils.cpp | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/external/sdl/CMakeLists.txt b/external/sdl/CMakeLists.txt index a7da14f1..c5658e48 100644 --- a/external/sdl/CMakeLists.txt +++ b/external/sdl/CMakeLists.txt @@ -24,6 +24,7 @@ if (NOT TARGET SDL3::SDL3) #GIT_TAG 67b973b5fad633b3be76d4daf4fd9fece292c25f # tip 29-07-2024 #GIT_TAG 6e885d96193a4b0096fe7fed6d4e6c3e5f247283 # tip 09-09-2024 #GIT_TAG 9dd8859240703d886941733ad32c1dc6f50d64f0 # tip 19-09-2024 + #GIT_TAG afdf325fb4090e93a124519d1a3bc1fbe0ba9025 # bad GIT_TAG e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e # tip 05-10-2024 (3.1.3) FIND_PACKAGE_ARGS # for the future diff --git a/flake.lock b/flake.lock index 6c0328d2..f29bc8d4 100644 --- a/flake.lock +++ b/flake.lock @@ -63,34 +63,34 @@ "sdl3": { "flake": false, "locked": { - "lastModified": 1726672741, - "narHash": "sha256-+L1khIk2nHI7V8o/RVk2MEHv+baoQvISNHNclOWPxQM=", + "lastModified": 1728073678, + "narHash": "sha256-S7yRcLHMPgq6+gec8l+ESxp2dJ+6Po/UNsBUXptQzMQ=", "owner": "libsdl-org", "repo": "SDL", - "rev": "9dd8859240703d886941733ad32c1dc6f50d64f0", + "rev": "e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e", "type": "github" }, "original": { "owner": "libsdl-org", "repo": "SDL", - "rev": "9dd8859240703d886941733ad32c1dc6f50d64f0", + "rev": "e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e", "type": "github" } }, "sdl3_image": { "flake": false, "locked": { - "lastModified": 1726603202, - "narHash": "sha256-jLKf3xSqjIL7L6iarQAiwcrmIQlM4R1zC2gXGXcdwPA=", + "lastModified": 1727262062, + "narHash": "sha256-o2NV02FeKSaQO3CBKYlqsu3HImziYCtWfum8G/pkX5o=", "owner": "libsdl-org", "repo": "SDL_image", - "rev": "b56e6c4d1a1c03b3904a8ad21f1fa73c651ffbfc", + "rev": "6f4584340b9b78542d11bf0232a1a0862de1f0a9", "type": "github" }, "original": { "owner": "libsdl-org", "repo": "SDL_image", - "rev": "b56e6c4d1a1c03b3904a8ad21f1fa73c651ffbfc", + "rev": "6f4584340b9b78542d11bf0232a1a0862de1f0a9", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 433f33ca..cf3d8780 100644 --- a/flake.nix +++ b/flake.nix @@ -11,11 +11,11 @@ flake = false; }; sdl3 = { - url = "github:libsdl-org/SDL/9dd8859240703d886941733ad32c1dc6f50d64f0"; # keep in sync this cmake + url = "github:libsdl-org/SDL/e292d1f5ace469f718d7b6b4dec8c28e37dcaa0e"; # keep in sync this cmake flake = false; }; sdl3_image = { - url = "github:libsdl-org/SDL_image/b56e6c4d1a1c03b3904a8ad21f1fa73c651ffbfc"; + url = "github:libsdl-org/SDL_image/6f4584340b9b78542d11bf0232a1a0862de1f0a9"; flake = false; }; }; diff --git a/src/image_loader_sdl_bmp.cpp b/src/image_loader_sdl_bmp.cpp index 8c92875e..a17476f2 100644 --- a/src/image_loader_sdl_bmp.cpp +++ b/src/image_loader_sdl_bmp.cpp @@ -10,7 +10,7 @@ ImageLoaderSDLBMP::ImageInfo ImageLoaderSDLBMP::loadInfoFromMemory(const uint8_t auto* ios = SDL_IOFromConstMem(data, data_size); - SDL_Surface* surf = SDL_LoadBMP_IO(ios, SDL_TRUE); + SDL_Surface* surf = SDL_LoadBMP_IO(ios, true); if (surf == nullptr) { return res; } @@ -31,7 +31,7 @@ ImageLoaderSDLBMP::ImageResult ImageLoaderSDLBMP::loadFromMemoryRGBA(const uint8 auto* ios = SDL_IOFromConstMem(data, data_size); - SDL_Surface* surf = SDL_LoadBMP_IO(ios, SDL_TRUE); + SDL_Surface* surf = SDL_LoadBMP_IO(ios, true); if (surf == nullptr) { return {}; } diff --git a/src/image_loader_sdl_image.cpp b/src/image_loader_sdl_image.cpp index 892a8b5b..4800e36c 100644 --- a/src/image_loader_sdl_image.cpp +++ b/src/image_loader_sdl_image.cpp @@ -58,7 +58,7 @@ ImageLoaderSDLImage::ImageInfo ImageLoaderSDLImage::loadInfoFromMemory(const uin return res; } - SDL_Surface* surf = IMG_Load_IO(ios, SDL_TRUE); + SDL_Surface* surf = IMG_Load_IO(ios, true); if (surf == nullptr) { return res; } @@ -83,7 +83,7 @@ ImageLoaderSDLImage::ImageResult ImageLoaderSDLImage::loadFromMemoryRGBA(const u return res; } - IMG_Animation* anim = IMG_LoadAnimation_IO(ios, SDL_TRUE); + IMG_Animation* anim = IMG_LoadAnimation_IO(ios, true); if (anim == nullptr) { return res; } diff --git a/src/sdl_clipboard_utils.cpp b/src/sdl_clipboard_utils.cpp index 991d4e0f..e0909053 100644 --- a/src/sdl_clipboard_utils.cpp +++ b/src/sdl_clipboard_utils.cpp @@ -9,7 +9,7 @@ static const char* clipboardHas(const std::vector& filter_mime_types) { for (const auto& mime_type : filter_mime_types) { // ASSERTS that stringview is null terminated - if (SDL_HasClipboardData(mime_type.data()) == SDL_TRUE) { + if (SDL_HasClipboardData(mime_type.data())) { return mime_type.data(); } }