mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
[fix] fix unused variables and type conversions
This commit is contained in:
@@ -88,7 +88,8 @@ int Render::ControlBar() {
|
||||
RemoteAction remote_action;
|
||||
remote_action.type = ControlType::audio_capture;
|
||||
remote_action.a = audio_capture_button_pressed_;
|
||||
SendData(peer_, (const char*)&remote_action, sizeof(remote_action));
|
||||
SendDataFrame(peer_, (const char*)&remote_action,
|
||||
sizeof(remote_action));
|
||||
}
|
||||
}
|
||||
if (!audio_capture_button_pressed_) {
|
||||
|
||||
@@ -62,7 +62,7 @@ int Render::ProcessMouseEvent(SDL_Event &event) {
|
||||
if (control_bar_hovered_) {
|
||||
remote_action.m.flag = MouseFlag::move;
|
||||
}
|
||||
SendData(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
SendDataFrame(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
} else if (SDL_MOUSEBUTTONUP == event.type) {
|
||||
remote_action.type = ControlType::mouse;
|
||||
if (SDL_BUTTON_LEFT == event.button.button) {
|
||||
@@ -73,11 +73,11 @@ int Render::ProcessMouseEvent(SDL_Event &event) {
|
||||
if (control_bar_hovered_) {
|
||||
remote_action.m.flag = MouseFlag::move;
|
||||
}
|
||||
SendData(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
SendDataFrame(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
} else if (SDL_MOUSEMOTION == event.type) {
|
||||
remote_action.type = ControlType::mouse;
|
||||
remote_action.m.flag = MouseFlag::move;
|
||||
SendData(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
SendDataFrame(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -93,7 +93,7 @@ int Render::SendKeyEvent(int key_code, bool is_down) {
|
||||
}
|
||||
remote_action.k.key_value = key_code;
|
||||
|
||||
SendData(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
SendDataFrame(peer_, (const char *)&remote_action, sizeof(remote_action));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -282,8 +282,8 @@ void Render::OnConnectionStatusCb(ConnectionStatus status, const char *user_id,
|
||||
remote_action.type = ControlType::host_infomation;
|
||||
memcpy(&remote_action.i.host_name, host_name.data(), host_name.size());
|
||||
remote_action.i.host_name_size = host_name.size();
|
||||
int ret = SendData(render->peer_, (const char *)&remote_action,
|
||||
sizeof(remote_action));
|
||||
int ret = SendDataFrame(render->peer_, (const char *)&remote_action,
|
||||
sizeof(remote_action));
|
||||
if (0 == ret) {
|
||||
render->hostname_sent_ = true;
|
||||
}
|
||||
|
||||
2
thirdparty/projectx
vendored
2
thirdparty/projectx
vendored
Submodule thirdparty/projectx updated: 8d56a76844...7e3856a68d
@@ -26,6 +26,8 @@ if is_os("windows") then
|
||||
add_links("Shell32", "windowsapp", "dwmapi", "User32", "kernel32",
|
||||
"SDL2-static", "SDL2main", "gdi32", "winmm", "setupapi", "version",
|
||||
"Imm32", "iphlpapi")
|
||||
-- add_cxflags("/W4", "/WX")
|
||||
add_cxflags("/W4")
|
||||
elseif is_os("linux") then
|
||||
add_requires("ffmpeg 5.1.2", {system = false})
|
||||
add_syslinks("pthread", "dl")
|
||||
@@ -36,12 +38,14 @@ elseif is_os("linux") then
|
||||
"-lasound", "-lxcb-shape", "-lxcb-xfixes", "-lsndio", "-lxcb",
|
||||
"-lxcb-shm", "-lXext", "-lX11", "-lXv", "-ldl", "-lpthread",
|
||||
{force = true})
|
||||
add_cxflags("-Wno-unused-variable")
|
||||
elseif is_os("macosx") then
|
||||
add_requires("ffmpeg 5.1.2", {system = false})
|
||||
add_requires("libxcb", {system = false})
|
||||
add_packages("libxcb")
|
||||
add_links("SDL2", "SDL2main")
|
||||
add_ldflags("-Wl,-ld_classic")
|
||||
add_cxflags("-Wno-unused-variable")
|
||||
add_frameworks("OpenGL", "IOSurface", "ScreenCaptureKit")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user