Compare commits

..

6 Commits

Author SHA1 Message Date
Green Sky
0d3696c0c5 fix local message duplication if joining a group via invite
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
2025-12-19 16:32:18 +01:00
Green Sky
811a673b0d correctly move buffer
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
other fixes
2025-12-19 16:06:50 +01:00
Green Sky
aef9593095 remove unused var 2025-12-19 14:15:46 +01:00
Green Sky
4dc22c012e update example config
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
2025-12-19 14:01:18 +01:00
Green Sky
aa8bacc18f fix more warnings
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousDelivery / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, ) (push) Has been cancelled
ContinuousDelivery / windows (windows-2022, asan) (push) Has been cancelled
ContinuousDelivery / dumpsyms (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
ContinuousIntegration / on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-24.04-arm (push) Has been cancelled
ContinuousIntegration / on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / asan on ubuntu-latest (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:arm64-v8a vcpkg_toolkit:arm64-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:armeabi-v7a vcpkg_toolkit:arm-neon-android-23]) (push) Has been cancelled
ContinuousIntegration / android (map[ndk_abi:x86_64 vcpkg_toolkit:x64-android-23]) (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
2025-12-19 13:28:26 +01:00
Green Sky
47278807f6 fix image loader warning by better handling errors 2025-12-19 13:23:38 +01:00
10 changed files with 41 additions and 19 deletions

View File

@@ -22,13 +22,12 @@
} }
}, },
"ImGuiFonts": { "ImGuiFonts": {
"atlas_extra_text": "🥰💀✌️🌴🐢🐐🍄⚽🍻👑📸😬👀🚨🏡🐦‍🔥🍋‍🟩🍄‍🟫🙂‍↕️🕊️🏆😻🌟🧿🍀🎨🍜",
"size": 20, "size": 20,
"fonts": { "fonts": {
"entries": { "entries": {
"/nix/store/7fjwhgbz16i08xm171arr081bqpivv7k-hack-font-3.003/share/fonts/truetype/Hack-Regular.ttf": true, "/nix/store/ihpjyw2nvm924kf84898v9zqizhbwvn6-hack-font-3.003/share/fonts/truetype/Hack-Regular.ttf": true,
"/nix/store/g4hlmhda2xmap333kqnzlsz01k8djnp6-noto-fonts-24.3.1/share/fonts/noto/NotoSans[wdth,wght].ttf": true, "/home/user/Downloads/TwitterColorEmoji-SVGinOT-15.1.0/TwitterColorEmoji-SVGinOT.ttf": true
"/nix/store/d7mgcvb59anvaz69cjghbb42616c7xfg-noto-fonts-monochrome-emoji-3.000/share/fonts/noto/NotoEmoji.ttf": true
} }
} }
} }

View File

@@ -65,7 +65,7 @@ std::optional<TextureEntry> BitsetImageLoader::haveToTexture(TextureUploaderI& t
BitsetImageLoader::BitsetImageLoader(void) { BitsetImageLoader::BitsetImageLoader(void) {
} }
TextureLoaderResult BitsetImageLoader::load(TextureUploaderI& tu, ObjectHandle o, uint32_t w, uint32_t h) { TextureLoaderResult BitsetImageLoader::load(TextureUploaderI& tu, ObjectHandle o, uint32_t /*w*/, uint32_t /*h*/) {
if (!static_cast<bool>(o)) { if (!static_cast<bool>(o)) {
std::cerr << "BIL error: trying to load invalid object\n"; std::cerr << "BIL error: trying to load invalid object\n";
return {}; return {};

View File

@@ -156,8 +156,6 @@ bool renderContactBig(
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
ImVec2 post_curser_pos = ImGui::GetCursorPos();
ImVec2 img_curser { ImVec2 img_curser {
orig_curser_pos.x + ImGui::GetStyle().FramePadding.x, orig_curser_pos.x + ImGui::GetStyle().FramePadding.x,
orig_curser_pos.y + ImGui::GetStyle().FramePadding.y orig_curser_pos.y + ImGui::GetStyle().FramePadding.y

View File

@@ -24,6 +24,24 @@ struct AudioFrame2 {
Span<int16_t> // non owning variant, for direct consumption Span<int16_t> // non owning variant, for direct consumption
> buffer; > buffer;
AudioFrame2(void) = default;
AudioFrame2(const AudioFrame2&) = default;
AudioFrame2(AudioFrame2&& other) :
sample_rate(other.sample_rate),
channels(other.channels),
buffer(std::move(other.buffer))
{}
AudioFrame2(uint32_t sample_rate_, size_t channels_, const std::variant<std::vector<int16_t>, Span<int16_t>>& buffer_) :
sample_rate(sample_rate_),
channels(channels_),
buffer(buffer_)
{}
AudioFrame2(uint32_t sample_rate_, size_t channels_, std::variant<std::vector<int16_t>, Span<int16_t>>&& buffer_) :
sample_rate(sample_rate_),
channels(channels_),
buffer(std::move(buffer_))
{}
// helpers // helpers
Span<int16_t> getSpan(void) const { Span<int16_t> getSpan(void) const {
if (std::holds_alternative<std::vector<int16_t>>(buffer)) { if (std::holds_alternative<std::vector<int16_t>>(buffer)) {

View File

@@ -28,7 +28,7 @@ struct LockedFrameStream2 : public FrameStream2I<FrameType> {
FrameType new_frame = std::move(_frames.front()); FrameType new_frame = std::move(_frames.front());
_frames.pop_front(); _frames.pop_front();
return std::move(new_frame); return new_frame;
} }
bool push(const FrameType& value) { bool push(const FrameType& value) {

View File

@@ -7,7 +7,7 @@
#include "../audio_stream_pop_reframer.hpp" #include "../audio_stream_pop_reframer.hpp"
// "thin" wrapper around sdl audio streams // "thin" wrapper around sdl audio streams
// we dont needs to get fance, as they already provide everything we need // we dont needs to get fancy, as they already provide everything we need
struct SDLAudio2StreamReader : public AudioFrame2Stream2I { struct SDLAudio2StreamReader : public AudioFrame2Stream2I {
std::unique_ptr<SDL_AudioStream, decltype(&SDL_DestroyAudioStream)> _stream; std::unique_ptr<SDL_AudioStream, decltype(&SDL_DestroyAudioStream)> _stream;

View File

@@ -6,9 +6,14 @@
#include "./image_scaler.hpp" #include "./image_scaler.hpp"
ImageLoaderI::ImageResult ImageLoaderI::ImageResult::crop(int32_t c_x, int32_t c_y, int32_t c_w, int32_t c_h) const { ImageLoaderI::ImageResult ImageLoaderI::ImageResult::crop(int32_t c_x, int32_t c_y, int32_t c_w, int32_t c_h) const {
// TODO: proper error handling if (
assert(c_x+c_w <= width); c_x < 0 || c_y < 0 || c_w < 1 || c_h < 1 ||
assert(c_y+c_h <= height); int64_t(c_x) + int64_t(c_w) > int64_t(width) || int64_t(c_y) + int64_t(c_h) > int64_t(height)
) {
// unreachable
assert(false && "invalid image crop");
return *this;
}
ImageLoaderI::ImageResult new_image; ImageLoaderI::ImageResult new_image;
new_image.width = c_w; new_image.width = c_w;
@@ -19,7 +24,7 @@ ImageLoaderI::ImageResult ImageLoaderI::ImageResult::crop(int32_t c_x, int32_t c
auto& new_frame = new_image.frames.emplace_back(); auto& new_frame = new_image.frames.emplace_back();
new_frame.ms = input_frame.ms; new_frame.ms = input_frame.ms;
// TODO: improve this, this is super inefficent // TODO: improve this, this is inefficent
for (int64_t y = c_y; y < c_y + c_h; y++) { for (int64_t y = c_y; y < c_y + c_h; y++) {
for (int64_t x = c_x; x < c_x + c_w; x++) { for (int64_t x = c_x; x < c_x + c_w; x++) {
new_frame.data.push_back(input_frame.data.at(y*width*4+x*4+0)); new_frame.data.push_back(input_frame.data.at(y*width*4+x*4+0));

View File

@@ -89,8 +89,8 @@ std::vector<uint8_t> ImageEncoderSTBPNG::encodeToMemoryRGBA(const ImageResult& i
struct Context { struct Context {
std::vector<uint8_t> new_data; std::vector<uint8_t> new_data;
} context; } context;
auto write_f = +[](void* context, void* data, int size) -> void { auto write_f = +[](void* context_, void* data, int size) -> void {
Context* ctx = reinterpret_cast<Context*>(context); Context* ctx = reinterpret_cast<Context*>(context_);
uint8_t* d = reinterpret_cast<uint8_t*>(data); uint8_t* d = reinterpret_cast<uint8_t*>(data);
ctx->new_data.insert(ctx->new_data.cend(), d, d + size); ctx->new_data.insert(ctx->new_data.cend(), d, d + size);
}; };
@@ -126,8 +126,8 @@ std::vector<uint8_t> ImageEncoderSTBJpeg::encodeToMemoryRGBA(const ImageResult&
struct Context { struct Context {
std::vector<uint8_t> new_data; std::vector<uint8_t> new_data;
} context; } context;
auto write_f = +[](void* context, void* data, int size) -> void { auto write_f = +[](void* context_, void* data, int size) -> void {
Context* ctx = reinterpret_cast<Context*>(context); Context* ctx = reinterpret_cast<Context*>(context_);
uint8_t* d = reinterpret_cast<uint8_t*>(data); uint8_t* d = reinterpret_cast<uint8_t*>(data);
ctx->new_data.insert(ctx->new_data.cend(), d, d + size); ctx->new_data.insert(ctx->new_data.cend(), d, d + size);
}; };

View File

@@ -15,11 +15,13 @@
#include "./start_screen.hpp" #include "./start_screen.hpp"
#ifdef __ANDROID__
#include <filesystem> #include <filesystem>
#endif
#include <memory> #include <memory>
#include <iostream> #include <iostream>
#include <string_view> #include <string_view>
#include <thread>
#include <chrono> #include <chrono>
#ifdef TOMATO_BREAKPAD #ifdef TOMATO_BREAKPAD