update deps and last seen first seen
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:
Green Sky
2025-01-07 21:30:40 +01:00
parent 0fb985c4f9
commit 3647ff3d54
16 changed files with 55 additions and 63 deletions

View File

@@ -6,6 +6,8 @@
#include "../image_loader_qoi.hpp"
#include "../image_loader_sdl_image.hpp"
#include <solanaceae/util/time.hpp>
#include <filesystem>
#include <solanaceae/file/file2_std.hpp>
@@ -13,11 +15,6 @@
#include <cmath>
// fwd
namespace Message {
uint64_t getTimeMS(void);
}
SendImagePopup::SendImagePopup(TextureUploaderI& tu) : _tu(tu) {
_image_loaders.push_back(std::make_unique<ImageLoaderSDLBMP>());
_image_loaders.push_back(std::make_unique<ImageLoaderQOI>());
@@ -90,7 +87,7 @@ bool SendImagePopup::load(void) {
}
assert(preview_image.textures.empty());
preview_image.timestamp_last_rendered = Message::getTimeMS();
preview_image.timestamp_last_rendered = getTimeMS();
preview_image.current_texture = 0;
for (const auto& [ms, data] : original_image.frames) {
const auto n_t = _tu.upload(data.data(), original_image.width, original_image.height);
@@ -226,7 +223,7 @@ void SendImagePopup::render(float time_delta) {
//const auto TEXT_BASE_WIDTH = ImGui::CalcTextSize("A").x;
const auto TEXT_BASE_HEIGHT = ImGui::GetTextLineHeightWithSpacing();
preview_image.doAnimation(Message::getTimeMS());
preview_image.doAnimation(getTimeMS());
time += time_delta;
time = fmod(time, 1.f); // fract()