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
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:
@ -33,7 +33,7 @@ ImageLoaderSDLBMP::ImageResult ImageLoaderSDLBMP::loadFromMemoryRGBA(const uint8
|
||||
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);
|
||||
if (conv_surf == nullptr) {
|
||||
return res;
|
||||
|
@ -89,7 +89,7 @@ ImageLoaderSDLImage::ImageResult ImageLoaderSDLImage::loadFromMemoryRGBA(const u
|
||||
}
|
||||
|
||||
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) {
|
||||
return res;
|
||||
}
|
||||
|
@ -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) {
|
||||
// TODO: test if pitch is 4 or 4*width
|
||||
SDL_Surface* surf = SDL_CreateSurfaceFrom(
|
||||
(void*)data,
|
||||
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
|
||||
|
||||
SDL_Texture* tex = SDL_CreateTexture(
|
||||
renderer,
|
||||
surf->format->format,
|
||||
surf->format,
|
||||
access == Access::STREAMING ? SDL_TEXTUREACCESS_STREAMING : SDL_TEXTUREACCESS_STATIC,
|
||||
surf->w, surf->h
|
||||
);
|
||||
|
Reference in New Issue
Block a user