mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-17 20:47:01 +08:00
Compare commits
2 Commits
v1.1.6-202
...
v1.1.6-202
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
239da373d0 | ||
|
|
217cfb091d |
@@ -101,7 +101,15 @@ int Render::RemoteWindow() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check every 1 second for rejoin
|
||||||
if (need_to_rejoin_) {
|
if (need_to_rejoin_) {
|
||||||
|
auto now = std::chrono::steady_clock::now();
|
||||||
|
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
|
now - last_rejoin_check_time_)
|
||||||
|
.count();
|
||||||
|
|
||||||
|
if (elapsed >= 1000) {
|
||||||
|
last_rejoin_check_time_ = now;
|
||||||
need_to_rejoin_ = false;
|
need_to_rejoin_ = false;
|
||||||
for (const auto& [_, props] : client_properties_) {
|
for (const auto& [_, props] : client_properties_) {
|
||||||
if (props->rejoin_) {
|
if (props->rejoin_) {
|
||||||
@@ -111,6 +119,7 @@ int Render::RemoteWindow() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ SDL_HitTestResult Render::HitTestCallback(SDL_Window* window,
|
|||||||
return SDL_HITTEST_NORMAL;
|
return SDL_HITTEST_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Render::Render() {}
|
Render::Render() : last_rejoin_check_time_(std::chrono::steady_clock::now()) {}
|
||||||
|
|
||||||
Render::~Render() {}
|
Render::~Render() {}
|
||||||
|
|
||||||
@@ -966,6 +966,7 @@ int Render::DrawStreamWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Render::Run() {
|
int Render::Run() {
|
||||||
|
LOG_INFO("CrossDesk version: {}", CROSSDESK_VERSION);
|
||||||
latest_version_info_ = CheckUpdate();
|
latest_version_info_ = CheckUpdate();
|
||||||
if (!latest_version_info_.empty() &&
|
if (!latest_version_info_.empty() &&
|
||||||
latest_version_info_.contains("version") &&
|
latest_version_info_.contains("version") &&
|
||||||
|
|||||||
@@ -379,6 +379,7 @@ class Render {
|
|||||||
int audio_len_ = 0;
|
int audio_len_ = 0;
|
||||||
bool audio_buffer_fresh_ = false;
|
bool audio_buffer_fresh_ = false;
|
||||||
bool need_to_rejoin_ = false;
|
bool need_to_rejoin_ = false;
|
||||||
|
std::chrono::steady_clock::time_point last_rejoin_check_time_;
|
||||||
bool just_created_ = false;
|
bool just_created_ = false;
|
||||||
std::string controlled_remote_id_ = "";
|
std::string controlled_remote_id_ = "";
|
||||||
std::string focused_remote_id_ = "";
|
std::string focused_remote_id_ = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user