fix sdl image loder io leak and send image popup fixes
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
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:armeabi-v7a vcpkg_toolkit:arm-neon-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
Some checks are pending
ContinuousDelivery / linux-ubuntu (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android]) (push) Waiting to run
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android]) (push) Waiting to run
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:armeabi-v7a vcpkg_toolkit:arm-neon-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
This commit is contained in:
parent
42dd6d16d7
commit
876f482391
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include <imgui/imgui.h>
|
#include <imgui/imgui.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
// fwd
|
// fwd
|
||||||
namespace Message {
|
namespace Message {
|
||||||
uint64_t getTimeMS(void);
|
uint64_t getTimeMS(void);
|
||||||
@ -91,7 +93,7 @@ bool SendImagePopup::load(void) {
|
|||||||
preview_image.timestamp_last_rendered = Message::getTimeMS();
|
preview_image.timestamp_last_rendered = Message::getTimeMS();
|
||||||
preview_image.current_texture = 0;
|
preview_image.current_texture = 0;
|
||||||
for (const auto& [ms, data] : original_image.frames) {
|
for (const auto& [ms, data] : original_image.frames) {
|
||||||
const auto n_t = _tu.uploadRGBA(data.data(), original_image.width, original_image.height);
|
const auto n_t = _tu.upload(data.data(), original_image.width, original_image.height);
|
||||||
preview_image.textures.push_back(n_t);
|
preview_image.textures.push_back(n_t);
|
||||||
preview_image.frame_duration.push_back(ms);
|
preview_image.frame_duration.push_back(ms);
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,7 @@ ImageLoaderSDLImage::ImageInfo ImageLoaderSDLImage::loadInfoFromMemory(const uin
|
|||||||
// we ignore tga
|
// we ignore tga
|
||||||
auto ext_opt = getExt(ios);
|
auto ext_opt = getExt(ios);
|
||||||
if (!ext_opt.has_value()) {
|
if (!ext_opt.has_value()) {
|
||||||
|
SDL_CloseIO(ios);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,6 +81,7 @@ ImageLoaderSDLImage::ImageResult ImageLoaderSDLImage::loadFromMemoryRGBA(const u
|
|||||||
// we ignore tga
|
// we ignore tga
|
||||||
auto ext_opt = getExt(ios);
|
auto ext_opt = getExt(ios);
|
||||||
if (!ext_opt.has_value()) {
|
if (!ext_opt.has_value()) {
|
||||||
|
SDL_CloseIO(ios);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user