[fix] fix compile error

This commit is contained in:
dijunkun
2024-11-22 16:45:14 +08:00
parent 52828183a1
commit 3f777e4662
6 changed files with 12 additions and 8 deletions

View File

@@ -4,6 +4,8 @@ KeyboardCapturer::KeyboardCapturer() {}
KeyboardCapturer::~KeyboardCapturer() {}
int KeyboardCapturer::Hook() { return 0; }
int KeyboardCapturer::Hook(OnKeyAction on_key_action, void *user_ptr) {
return 0;
}
int KeyboardCapturer::Unhook() { return 0; }

View File

@@ -15,7 +15,7 @@ class KeyboardCapturer : public DeviceController {
virtual ~KeyboardCapturer();
public:
virtual int Hook();
virtual int Hook(OnKeyAction on_key_action, void *user_ptr);
virtual int Unhook();
private:

View File

@@ -4,6 +4,8 @@ KeyboardCapturer::KeyboardCapturer() {}
KeyboardCapturer::~KeyboardCapturer() {}
int KeyboardCapturer::Hook() { return 0; }
int KeyboardCapturer::Hook(OnKeyAction on_key_action, void *user_ptr) {
return 0;
}
int KeyboardCapturer::Unhook() { return 0; }

View File

@@ -15,7 +15,7 @@ class KeyboardCapturer : public DeviceController {
virtual ~KeyboardCapturer();
public:
virtual int Hook();
virtual int Hook(OnKeyAction on_key_action, void *user_ptr);
virtual int Unhook();
private:

View File

@@ -123,14 +123,14 @@ int Render::ShowRecentConnections() {
ImGui::SetCursorPos(
ImVec2(dummy_button_pos.x + 2.0f, dummy_button_pos.y + 1.0f));
ImGui::SetWindowFontScale(0.65f);
ImGui::Text(remote_id.c_str());
ImGui::Text("%s", remote_id.c_str());
ImGui::SetWindowFontScale(1.0f);
ImGui::PopStyleColor(3);
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::SetWindowFontScale(0.5f);
ImGui::Text(host_name.c_str());
ImGui::Text("%s", host_name.c_str());
ImGui::SetWindowFontScale(1.0f);
ImGui::EndTooltip();
}
@@ -264,7 +264,7 @@ int Render::ConfirmDeleteConnection() {
auto text_width = ImGui::CalcTextSize(text.c_str()).x;
ImGui::SetCursorPosX((window_width - text_width) * 0.5f);
ImGui::SetCursorPosY(window_height * 0.2f);
ImGui::Text(text.c_str());
ImGui::Text("%s", text.c_str());
ImGui::SetWindowFontScale(1.0f);
ImGui::End();

View File

@@ -109,7 +109,7 @@ target("device_controller")
"src/device_controller/keyboard/windows", {public = true})
elseif is_os("macosx") then
add_files("src/device_controller/mouse/mac/*.cpp",
"src/device_controller/mouse/keyboard/*.cpp")
"src/device_controller/keyboard/mac/*.cpp")
add_includedirs("src/device_controller/mouse/mac",
"src/device_controller/keyboard/mac", {public = true})
elseif is_os("linux") then