update sdl and sdl_image to latest
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Failing after 5m23s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m51s
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m30s
ContinuousIntegration / linux (push) Successful in 4m36s
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Failing after 5m33s
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Failing after 5m45s
ContinuousDelivery / windows (push) Has been cancelled
ContinuousDelivery / windows-asan (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
Green Sky 2024-09-09 11:49:32 +02:00
parent 4b9fd6db81
commit 3b399fec5c
No known key found for this signature in database
6 changed files with 22 additions and 20 deletions

View File

@ -21,7 +21,8 @@ if (NOT TARGET SDL3::SDL3)
#GIT_TAG 657c0135b1ff1685afa1bad63b0417d92f4bcb46 # tip 09-06-2024 #GIT_TAG 657c0135b1ff1685afa1bad63b0417d92f4bcb46 # tip 09-06-2024
#GIT_TAG d65a8146b950abe31b4fbf779f3e2fea731af9bd # tip 16-07-2024 - before string policy changes breaking imgui #GIT_TAG d65a8146b950abe31b4fbf779f3e2fea731af9bd # tip 16-07-2024 - before string policy changes breaking imgui
#GIT_TAG e949f12f63cdfcef4bdf456936ee676e0a3f9de6 # tip 18-07-2024 - broke bmp surface (before too) #GIT_TAG e949f12f63cdfcef4bdf456936ee676e0a3f9de6 # tip 18-07-2024 - broke bmp surface (before too)
GIT_TAG 67b973b5fad633b3be76d4daf4fd9fece292c25f # tip 29-07-2024 #GIT_TAG 67b973b5fad633b3be76d4daf4fd9fece292c25f # tip 29-07-2024
GIT_TAG 6e885d96193a4b0096fe7fed6d4e6c3e5f247283 # tip 09-09-2024
FIND_PACKAGE_ARGS # for the future FIND_PACKAGE_ARGS # for the future
) )

View File

@ -5,12 +5,12 @@ include(FetchContent)
if (NOT TARGET SDL3_image::SDL3_image) if (NOT TARGET SDL3_image::SDL3_image)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
# TODO: make pr to make this an option # TODO: make pr to make this an option
set(SDL3IMAGE_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) set(SDLIMAGE_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(SDL3IMAGE_BACKEND_STB OFF CACHE BOOL "" FORCE) # important for security set(SDLIMAGE_BACKEND_STB OFF CACHE BOOL "" FORCE) # important for security
set(SDL3IMAGE_BACKEND_IMAGEIO OFF CACHE BOOL "" FORCE) # some funky apple cmake bug set(SDLIMAGE_BACKEND_IMAGEIO OFF CACHE BOOL "" FORCE) # some funky apple cmake bug
#set(SDL3IMAGE_JXL ON CACHE BOOL "" FORCE) # default to off #set(SDLIMAGE_JXL ON CACHE BOOL "" FORCE) # default to off
set(SDL3IMAGE_QOI OFF CACHE BOOL "" FORCE) # we have our own set(SDLIMAGE_QOI OFF CACHE BOOL "" FORCE) # we have our own
set(SDL3IMAGE_WEBP OFF CACHE BOOL "" FORCE) # we have our own set(SDLIMAGE_WEBP OFF CACHE BOOL "" FORCE) # we have our own
FetchContent_Declare(SDL3_image FetchContent_Declare(SDL3_image
GIT_REPOSITORY https://github.com/libsdl-org/SDL_image GIT_REPOSITORY https://github.com/libsdl-org/SDL_image
@ -20,7 +20,8 @@ if (NOT TARGET SDL3_image::SDL3_image)
#GIT_TAG 2fc5310a9a2700fc856663200f94edebeb5e554a # tip 28-05-2024 #GIT_TAG 2fc5310a9a2700fc856663200f94edebeb5e554a # tip 28-05-2024
#GIT_TAG 8eff782fa33d795c9ea1ac42dbe7e17cc9874c78 # tip 09-06-2024 #GIT_TAG 8eff782fa33d795c9ea1ac42dbe7e17cc9874c78 # tip 09-06-2024
#GIT_TAG 8abc07df88cc035997e797967ac2f479b0e50981 # tip 18-07-2024 #GIT_TAG 8abc07df88cc035997e797967ac2f479b0e50981 # tip 18-07-2024
GIT_TAG 2a27018eda394a4e005cd8ba6bb3bfd0298809c7 # tip 29-07-2024 #GIT_TAG 2a27018eda394a4e005cd8ba6bb3bfd0298809c7 # tip 29-07-2024
GIT_TAG c1b272450d306db3845086cc231acae736b92f4f # tip 09-09-2024
FIND_PACKAGE_ARGS # for the future FIND_PACKAGE_ARGS # for the future
) )
FetchContent_MakeAvailable(SDL3_image) FetchContent_MakeAvailable(SDL3_image)

View File

@ -63,34 +63,34 @@
"sdl3": { "sdl3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1722282731, "lastModified": 1725865005,
"narHash": "sha256-02y7JB23xAehjqBp6hj7ExNkD06XkFE8Odxnu0hYx8k=", "narHash": "sha256-4vauaoxf+2LhGYLKRJOugZWKKMqa0bHTJCuR2F01DeM=",
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL", "repo": "SDL",
"rev": "67b973b5fad633b3be76d4daf4fd9fece292c25f", "rev": "6e885d96193a4b0096fe7fed6d4e6c3e5f247283",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL", "repo": "SDL",
"rev": "67b973b5fad633b3be76d4daf4fd9fece292c25f", "rev": "6e885d96193a4b0096fe7fed6d4e6c3e5f247283",
"type": "github" "type": "github"
} }
}, },
"sdl3_image": { "sdl3_image": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1722000822, "lastModified": 1725662120,
"narHash": "sha256-h2vyWcGdLPbg42M6bgJAzskXJfeq9UYTMHi1XdP/otk=", "narHash": "sha256-jLKf3xSqjIL7L6iarQAiwcrmIQlM4R1zC2gXGXcdwPA=",
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL_image", "repo": "SDL_image",
"rev": "2a27018eda394a4e005cd8ba6bb3bfd0298809c7", "rev": "c1b272450d306db3845086cc231acae736b92f4f",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL_image", "repo": "SDL_image",
"rev": "2a27018eda394a4e005cd8ba6bb3bfd0298809c7", "rev": "c1b272450d306db3845086cc231acae736b92f4f",
"type": "github" "type": "github"
} }
}, },

View File

@ -11,11 +11,11 @@
flake = false; flake = false;
}; };
sdl3 = { sdl3 = {
url = "github:libsdl-org/SDL/67b973b5fad633b3be76d4daf4fd9fece292c25f"; # keep in sync this cmake url = "github:libsdl-org/SDL/6e885d96193a4b0096fe7fed6d4e6c3e5f247283"; # keep in sync this cmake
flake = false; flake = false;
}; };
sdl3_image = { sdl3_image = {
url = "github:libsdl-org/SDL_image/2a27018eda394a4e005cd8ba6bb3bfd0298809c7"; url = "github:libsdl-org/SDL_image/c1b272450d306db3845086cc231acae736b92f4f";
flake = false; flake = false;
}; };
}; };

View File

@ -52,7 +52,7 @@ ImageLoaderSDLBMP::ImageResult ImageLoaderSDLBMP::loadFromMemoryRGBA(const uint8
ImageResult res; ImageResult res;
if (SDL_MUSTLOCK(conv_surf)) { if (SDL_MUSTLOCK(conv_surf)) {
if (SDL_LockSurface(conv_surf) < 0) { if (!SDL_LockSurface(conv_surf)) {
std::cerr << "IL_SDLBMP error: " << SDL_GetError() << "\n"; std::cerr << "IL_SDLBMP error: " << SDL_GetError() << "\n";
SDL_DestroySurface(conv_surf); SDL_DestroySurface(conv_surf);
return {}; return {};

View File

@ -44,7 +44,7 @@ int main(int argc, char** argv) {
auto last_time_tick = std::chrono::steady_clock::now(); auto last_time_tick = std::chrono::steady_clock::now();
// actual setup // actual setup
if (SDL_Init(SDL_INIT_VIDEO) < 0) { if (!SDL_Init(SDL_INIT_VIDEO)) {
std::cerr << "SDL_Init failed (" << SDL_GetError() << ")\n"; std::cerr << "SDL_Init failed (" << SDL_GetError() << ")\n";
return 1; return 1;
} }