update flake and code
Some checks failed
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousDelivery / windows (push) Waiting to run
ContinuousDelivery / windows-asan (push) Waiting to run
ContinuousDelivery / release (push) Blocked by required conditions
ContinuousIntegration / linux (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android]) (push) Waiting to run
ContinuousIntegration / macos (push) Waiting to run
ContinuousIntegration / windows (push) Waiting to run
ContinuousDelivery / linux-ubuntu (push) Failing after 4m34s
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Has been cancelled

This commit is contained in:
Green Sky 2024-07-18 12:22:15 +02:00
parent d6d91e61f4
commit 9fd2440ec6
No known key found for this signature in database
5 changed files with 16 additions and 16 deletions

View File

@ -63,34 +63,34 @@
"sdl3": { "sdl3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1718035458, "lastModified": 1721156595,
"narHash": "sha256-PGt/GfYUuT7u8UjIU4wvIJhBIMG+wq/fYasSW/4Y00k=", "narHash": "sha256-BamJ5xK2uEHv1Q5AM2aNYk+ZDsrKCVsyZ4ium7pTTis=",
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL", "repo": "SDL",
"rev": "657c0135b1ff1685afa1bad63b0417d92f4bcb46", "rev": "d65a8146b950abe31b4fbf779f3e2fea731af9bd",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL", "repo": "SDL",
"rev": "657c0135b1ff1685afa1bad63b0417d92f4bcb46", "rev": "d65a8146b950abe31b4fbf779f3e2fea731af9bd",
"type": "github" "type": "github"
} }
}, },
"sdl3_image": { "sdl3_image": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1717528558, "lastModified": 1721253495,
"narHash": "sha256-VS5GMxcJgmghmck1FoGJmrt94ubtBr9eGQUmYEMoUZQ=", "narHash": "sha256-mZjO5Tfu6TyGGC/2AduzOqKHW9NdH4oSzyVGjipW5bQ=",
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL_image", "repo": "SDL_image",
"rev": "8eff782fa33d795c9ea1ac42dbe7e17cc9874c78", "rev": "8abc07df88cc035997e797967ac2f479b0e50981",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "libsdl-org", "owner": "libsdl-org",
"repo": "SDL_image", "repo": "SDL_image",
"rev": "8eff782fa33d795c9ea1ac42dbe7e17cc9874c78", "rev": "8abc07df88cc035997e797967ac2f479b0e50981",
"type": "github" "type": "github"
} }
}, },

View File

@ -11,11 +11,11 @@
flake = false; flake = false;
}; };
sdl3 = { sdl3 = {
url = "github:libsdl-org/SDL/657c0135b1ff1685afa1bad63b0417d92f4bcb46"; # keep in sync this cmake url = "github:libsdl-org/SDL/d65a8146b950abe31b4fbf779f3e2fea731af9bd"; # keep in sync this cmake
flake = false; flake = false;
}; };
sdl3_image = { sdl3_image = {
url = "github:libsdl-org/SDL_image/8eff782fa33d795c9ea1ac42dbe7e17cc9874c78"; url = "github:libsdl-org/SDL_image/8abc07df88cc035997e797967ac2f479b0e50981";
flake = false; flake = false;
}; };
}; };

View File

@ -33,7 +33,7 @@ ImageLoaderSDLBMP::ImageResult ImageLoaderSDLBMP::loadFromMemoryRGBA(const uint8
return res; return res;
} }
SDL_Surface* conv_surf = SDL_ConvertSurfaceFormat(surf, SDL_PIXELFORMAT_RGBA32); SDL_Surface* conv_surf = SDL_ConvertSurface(surf, SDL_PIXELFORMAT_RGBA32);
SDL_DestroySurface(surf); SDL_DestroySurface(surf);
if (conv_surf == nullptr) { if (conv_surf == nullptr) {
return res; return res;

View File

@ -89,7 +89,7 @@ ImageLoaderSDLImage::ImageResult ImageLoaderSDLImage::loadFromMemoryRGBA(const u
} }
for (int i = 0; i < anim->count; i++) { for (int i = 0; i < anim->count; i++) {
SDL_Surface* conv_surf = SDL_ConvertSurfaceFormat(anim->frames[i], SDL_PIXELFORMAT_RGBA32); SDL_Surface* conv_surf = SDL_ConvertSurface(anim->frames[i], SDL_PIXELFORMAT_RGBA32);
if (conv_surf == nullptr) { if (conv_surf == nullptr) {
return res; return res;
} }

View File

@ -14,16 +14,16 @@ SDLRendererTextureUploader::SDLRendererTextureUploader(SDL_Renderer* renderer_)
uint64_t SDLRendererTextureUploader::uploadRGBA(const uint8_t* data, uint32_t width, uint32_t height, Filter filter, Access access) { uint64_t SDLRendererTextureUploader::uploadRGBA(const uint8_t* data, uint32_t width, uint32_t height, Filter filter, Access access) {
// TODO: test if pitch is 4 or 4*width // TODO: test if pitch is 4 or 4*width
SDL_Surface* surf = SDL_CreateSurfaceFrom( SDL_Surface* surf = SDL_CreateSurfaceFrom(
(void*)data,
width, height, width, height,
4*width, SDL_PIXELFORMAT_RGBA32, // auto big/little
SDL_PIXELFORMAT_RGBA32 // auto big/little (void*)data,
4*width
); );
assert(surf); // TODO: add error reporting assert(surf); // TODO: add error reporting
SDL_Texture* tex = SDL_CreateTexture( SDL_Texture* tex = SDL_CreateTexture(
renderer, renderer,
surf->format->format, surf->format,
access == Access::STREAMING ? SDL_TEXTUREACCESS_STREAMING : SDL_TEXTUREACCESS_STATIC, access == Access::STREAMING ? SDL_TEXTUREACCESS_STREAMING : SDL_TEXTUREACCESS_STATIC,
surf->w, surf->h surf->w, surf->h
); );