mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-12-19 22:09:09 +08:00
Compare commits
2 Commits
v1.0.2-bet
...
v1.0.3-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3132db785 | ||
|
|
43db021326 |
@@ -1,5 +1,5 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifdef DESK_PORT_DEBUG
|
#ifdef CROSSDESK_DEBUG
|
||||||
#pragma comment(linker, "/subsystem:\"console\"")
|
#pragma comment(linker, "/subsystem:\"console\"")
|
||||||
#else
|
#else
|
||||||
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
|
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
|
||||||
|
|||||||
@@ -181,8 +181,9 @@ int ConfigCenter::SetServerPort(int signal_server_port) {
|
|||||||
|
|
||||||
int ConfigCenter::SetCoturnServerPort(int coturn_server_port) {
|
int ConfigCenter::SetCoturnServerPort(int coturn_server_port) {
|
||||||
coturn_server_port_ = coturn_server_port;
|
coturn_server_port_ = coturn_server_port;
|
||||||
SI_Error rc = ini_.SetLongValue(section_, "coturn_server_port",
|
ini_.SetLongValue(section_, "coturn_server_port",
|
||||||
static_cast<long>(coturn_server_port_));
|
static_cast<long>(coturn_server_port_));
|
||||||
|
SI_Error rc = ini_.SaveFile(config_path_.c_str());
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -201,6 +202,7 @@ int ConfigCenter::SetCertFilePath(const std::string& cert_file_path) {
|
|||||||
|
|
||||||
int ConfigCenter::SetSelfHosted(bool enable_self_hosted) {
|
int ConfigCenter::SetSelfHosted(bool enable_self_hosted) {
|
||||||
enable_self_hosted_ = enable_self_hosted;
|
enable_self_hosted_ = enable_self_hosted;
|
||||||
|
ini_.SetBoolValue(section_, "enable_self_hosted", enable_self_hosted_);
|
||||||
SI_Error rc = ini_.SaveFile(config_path_.c_str());
|
SI_Error rc = ini_.SaveFile(config_path_.c_str());
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
@@ -210,6 +212,12 @@ int ConfigCenter::SetSelfHosted(bool enable_self_hosted) {
|
|||||||
|
|
||||||
int ConfigCenter::SetMinimizeToTray(bool enable_minimize_to_tray) {
|
int ConfigCenter::SetMinimizeToTray(bool enable_minimize_to_tray) {
|
||||||
enable_minimize_to_tray_ = enable_minimize_to_tray;
|
enable_minimize_to_tray_ = enable_minimize_to_tray;
|
||||||
|
ini_.SetBoolValue(section_, "enable_minimize_to_tray",
|
||||||
|
enable_minimize_to_tray_);
|
||||||
|
SI_Error rc = ini_.SaveFile(config_path_.c_str());
|
||||||
|
if (rc < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,10 @@ int Render::ConnectTo(const std::string& remote_id, const char* password,
|
|||||||
memcpy(&props->params_, ¶ms_, sizeof(Params));
|
memcpy(&props->params_, ¶ms_, sizeof(Params));
|
||||||
props->params_.user_id = props->local_id_.c_str();
|
props->params_.user_id = props->local_id_.c_str();
|
||||||
props->peer_ = CreatePeer(&props->params_);
|
props->peer_ = CreatePeer(&props->params_);
|
||||||
|
|
||||||
|
for (auto& display_info : display_info_list_) {
|
||||||
|
AddVideoStream(peer_, display_info.name.c_str());
|
||||||
|
}
|
||||||
AddAudioStream(props->peer_, props->audio_label_.c_str());
|
AddAudioStream(props->peer_, props->audio_label_.c_str());
|
||||||
AddDataStream(props->peer_, props->data_label_.c_str());
|
AddDataStream(props->peer_, props->data_label_.c_str());
|
||||||
|
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ int Render::LoadSettingsFromCacheFile() {
|
|||||||
enable_hardware_video_codec_ = config_center_->IsHardwareVideoCodec();
|
enable_hardware_video_codec_ = config_center_->IsHardwareVideoCodec();
|
||||||
enable_turn_ = config_center_->IsEnableTurn();
|
enable_turn_ = config_center_->IsEnableTurn();
|
||||||
enable_srtp_ = config_center_->IsEnableSrtp();
|
enable_srtp_ = config_center_->IsEnableSrtp();
|
||||||
|
enable_self_hosted_ = config_center_->IsSelfHosted();
|
||||||
|
|
||||||
language_button_value_last_ = language_button_value_;
|
language_button_value_last_ = language_button_value_;
|
||||||
video_quality_button_value_last_ = video_quality_button_value_;
|
video_quality_button_value_last_ = video_quality_button_value_;
|
||||||
@@ -265,6 +266,7 @@ int Render::LoadSettingsFromCacheFile() {
|
|||||||
enable_hardware_video_codec_last_ = enable_hardware_video_codec_;
|
enable_hardware_video_codec_last_ = enable_hardware_video_codec_;
|
||||||
enable_turn_last_ = enable_turn_;
|
enable_turn_last_ = enable_turn_;
|
||||||
enable_srtp_last_ = enable_srtp_;
|
enable_srtp_last_ = enable_srtp_;
|
||||||
|
enable_self_hosted_last_ = enable_self_hosted_;
|
||||||
|
|
||||||
LOG_INFO("Load settings from cache file");
|
LOG_INFO("Load settings from cache file");
|
||||||
|
|
||||||
|
|||||||
@@ -445,13 +445,14 @@ class Render {
|
|||||||
char signal_server_port_[6] = "9099";
|
char signal_server_port_[6] = "9099";
|
||||||
char coturn_server_port_[6] = "3478";
|
char coturn_server_port_[6] = "3478";
|
||||||
char cert_file_path_[256] = "";
|
char cert_file_path_[256] = "";
|
||||||
bool enable_self_hosted_server_ = false;
|
bool enable_self_hosted_ = false;
|
||||||
int language_button_value_last_ = 0;
|
int language_button_value_last_ = 0;
|
||||||
int video_quality_button_value_last_ = 0;
|
int video_quality_button_value_last_ = 0;
|
||||||
int video_encode_format_button_value_last_ = 0;
|
int video_encode_format_button_value_last_ = 0;
|
||||||
bool enable_hardware_video_codec_last_ = false;
|
bool enable_hardware_video_codec_last_ = false;
|
||||||
bool enable_turn_last_ = false;
|
bool enable_turn_last_ = false;
|
||||||
bool enable_srtp_last_ = false;
|
bool enable_srtp_last_ = false;
|
||||||
|
bool enable_self_hosted_last_ = false;
|
||||||
bool enable_minimize_to_tray_ = false;
|
bool enable_minimize_to_tray_ = false;
|
||||||
bool enable_minimize_to_tray_last_ = false;
|
bool enable_minimize_to_tray_last_ = false;
|
||||||
char signal_server_ip_self_[256] = "";
|
char signal_server_ip_self_[256] = "";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#define NV12_BUFFER_SIZE 1280 * 720 * 3 / 2
|
#define NV12_BUFFER_SIZE 1280 * 720 * 3 / 2
|
||||||
|
|
||||||
#ifdef DESK_PORT_DEBUG
|
#ifdef CROSSDESK_DEBUG
|
||||||
#else
|
#else
|
||||||
#define MOUSE_CONTROL 1
|
#define MOUSE_CONTROL 1
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -231,8 +231,7 @@ int Render::SettingWindow() {
|
|||||||
ImGui::SetCursorPosX(ENABLE_SELF_HOSTED_SERVER_CHECKBOX_PADDING_EN);
|
ImGui::SetCursorPosX(ENABLE_SELF_HOSTED_SERVER_CHECKBOX_PADDING_EN);
|
||||||
}
|
}
|
||||||
ImGui::SetCursorPosY(settings_items_offset);
|
ImGui::SetCursorPosY(settings_items_offset);
|
||||||
ImGui::Checkbox("##enable_self_hosted_server",
|
ImGui::Checkbox("##enable_self_hosted", &enable_self_hosted_);
|
||||||
&enable_self_hosted_server_);
|
|
||||||
}
|
}
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
@@ -332,11 +331,12 @@ int Render::SettingWindow() {
|
|||||||
}
|
}
|
||||||
enable_srtp_last_ = enable_srtp_;
|
enable_srtp_last_ = enable_srtp_;
|
||||||
|
|
||||||
if (enable_self_hosted_server_) {
|
if (enable_self_hosted_) {
|
||||||
config_center_->SetSelfHosted(true);
|
config_center_->SetSelfHosted(true);
|
||||||
} else {
|
} else {
|
||||||
config_center_->SetSelfHosted(false);
|
config_center_->SetSelfHosted(false);
|
||||||
}
|
}
|
||||||
|
enable_self_hosted_last_ = enable_self_hosted_;
|
||||||
|
|
||||||
settings_window_pos_reset_ = true;
|
settings_window_pos_reset_ = true;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ std::filesystem::path PathManager::GetConfigPath() {
|
|||||||
|
|
||||||
std::filesystem::path PathManager::GetCachePath() {
|
std::filesystem::path PathManager::GetCachePath() {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#ifdef CROSSDESK_DEBUG
|
||||||
|
return "cache";
|
||||||
|
#else
|
||||||
return GetKnownFolder(FOLDERID_LocalAppData) / app_name_ / "cache";
|
return GetKnownFolder(FOLDERID_LocalAppData) / app_name_ / "cache";
|
||||||
|
#endif
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
return GetEnvOrDefault("XDG_CACHE_HOME", GetHome() + "/.cache") / app_name_;
|
return GetEnvOrDefault("XDG_CACHE_HOME", GetHome() + "/.cache") / app_name_;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Submodule submodules/minirtc updated: 40eaf93b42...1f999dbe1f
@@ -16,7 +16,7 @@ set_encodings("utf-8")
|
|||||||
|
|
||||||
add_defines("UNICODE")
|
add_defines("UNICODE")
|
||||||
if is_mode("debug") then
|
if is_mode("debug") then
|
||||||
add_defines("DESK_PORT_DEBUG")
|
add_defines("CROSSDESK_DEBUG")
|
||||||
end
|
end
|
||||||
|
|
||||||
add_requires("spdlog 1.14.1", {system = false})
|
add_requires("spdlog 1.14.1", {system = false})
|
||||||
|
|||||||
Reference in New Issue
Block a user