fix sdl image loder io leak and send image popup fixes

This commit is contained in:
Green Sky
2024-12-18 21:12:20 +01:00
parent 42dd6d16d7
commit 876f482391
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,8 @@
#include <imgui/imgui.h>
#include <cmath>
// fwd
namespace Message {
uint64_t getTimeMS(void);
@ -91,7 +93,7 @@ bool SendImagePopup::load(void) {
preview_image.timestamp_last_rendered = Message::getTimeMS();
preview_image.current_texture = 0;
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.frame_duration.push_back(ms);
}