mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] fix redefinition error on MacOSX
This commit is contained in:
@@ -9,7 +9,12 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
typedef enum { mouse = 0, keyboard, audio_capture, host_info } ControlType;
|
typedef enum {
|
||||||
|
mouse = 0,
|
||||||
|
keyboard,
|
||||||
|
audio_capture,
|
||||||
|
host_infomation
|
||||||
|
} ControlType;
|
||||||
typedef enum { move = 0, left_down, left_up, right_down, right_up } MouseFlag;
|
typedef enum { move = 0, left_down, left_up, right_down, right_up } MouseFlag;
|
||||||
typedef enum { key_down = 0, key_up } KeyFlag;
|
typedef enum { key_down = 0, key_up } KeyFlag;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ void Render::OnReceiveDataBufferCb(const char *data, size_t size,
|
|||||||
render->StopSpeakerCapture();
|
render->StopSpeakerCapture();
|
||||||
}
|
}
|
||||||
} else if (ControlType::keyboard == remote_action.type) {
|
} else if (ControlType::keyboard == remote_action.type) {
|
||||||
} else if (ControlType::host_info == remote_action.type) {
|
} else if (ControlType::host_infomation == remote_action.type) {
|
||||||
render->host_name_ =
|
render->host_name_ =
|
||||||
std::string(remote_action.i.host_name, remote_action.i.host_name_size);
|
std::string(remote_action.i.host_name, remote_action.i.host_name_size);
|
||||||
LOG_INFO("Remote hostname: [{}]", render->host_name_);
|
LOG_INFO("Remote hostname: [{}]", render->host_name_);
|
||||||
@@ -270,7 +270,7 @@ void Render::OnConnectionStatusCb(ConnectionStatus status, const char *user_id,
|
|||||||
if (!render->hostname_sent_) {
|
if (!render->hostname_sent_) {
|
||||||
std::string host_name = GetHostName();
|
std::string host_name = GetHostName();
|
||||||
RemoteAction remote_action;
|
RemoteAction remote_action;
|
||||||
remote_action.type = ControlType::host_info;
|
remote_action.type = ControlType::host_infomation;
|
||||||
memcpy(&remote_action.i.host_name, host_name.data(), host_name.size());
|
memcpy(&remote_action.i.host_name, host_name.data(), host_name.size());
|
||||||
remote_action.i.host_name_size = host_name.size();
|
remote_action.i.host_name_size = host_name.size();
|
||||||
int ret = SendData(render->peer_, DATA_TYPE::DATA,
|
int ret = SendData(render->peer_, DATA_TYPE::DATA,
|
||||||
|
|||||||
Reference in New Issue
Block a user