Skip to content

Commit

Permalink
more sdl upgrade changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Green-Sky committed Oct 5, 2024
1 parent abd95b9 commit 9402ff6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions external/sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
Expand Down
4 changes: 2 additions & 2 deletions src/image_loader_sdl_bmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 {};
}
Expand Down
4 changes: 2 additions & 2 deletions src/image_loader_sdl_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/sdl_clipboard_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
static const char* clipboardHas(const std::vector<std::string_view>& 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();
}
}
Expand Down

0 comments on commit 9402ff6

Please sign in to comment.