[fix] adapt recent connection thumbnails to display DPI

This commit is contained in:
dijunkun
2026-10-25 02:57:33 +08:00
parent 7fc21f01bc
commit 0fb4b031c7
6 changed files with 148 additions and 113 deletions
+1 -3
View File
@@ -355,9 +355,7 @@ void GuiRuntime::HandleRecentConnections() {
if (session_cleanup_tasks_.empty() && reload_recent_connections_ && thumbnail_) {
uint32_t now_time = SDL_GetTicks();
if (now_time - recent_connection_image_save_time_ >= 50) {
int ret = thumbnail_->LoadThumbnail(recent_connections_,
&recent_connection_image_width_,
&recent_connection_image_height_);
int ret = thumbnail_->LoadThumbnail(recent_connections_);
if (!ret) {
LOG_INFO("Load recent connection thumbnails");
}
@@ -59,8 +59,6 @@ struct RecentConnectionsState {
recent_connections_;
std::vector<std::string> recent_connection_ids_;
std::vector<std::string> gallery_presence_ids_;
int recent_connection_image_width_ = 160;
int recent_connection_image_height_ = 90;
uint32_t recent_connection_image_save_time_ = 0;
DevicePresenceCache device_presence_cache_;
std::atomic<bool> need_to_send_recent_connections_{true};