mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] fix all unused variables and type conversions
This commit is contained in:
@@ -45,7 +45,7 @@ int KeyboardCapturer::Unhook() {
|
||||
int KeyboardCapturer::SendKeyboardCommand(int key_code, bool is_down) {
|
||||
INPUT input = {0};
|
||||
input.type = INPUT_KEYBOARD;
|
||||
input.ki.wVk = key_code;
|
||||
input.ki.wVk = (WORD)key_code;
|
||||
|
||||
if (!is_down) {
|
||||
input.ki.dwFlags = KEYEVENTF_KEYUP;
|
||||
|
||||
@@ -20,8 +20,8 @@ int MouseController::SendCommand(RemoteAction remote_action) {
|
||||
|
||||
if (remote_action.type == ControlType::mouse) {
|
||||
ip.type = INPUT_MOUSE;
|
||||
ip.mi.dx = remote_action.m.x;
|
||||
ip.mi.dy = remote_action.m.y;
|
||||
ip.mi.dx = (LONG)remote_action.m.x;
|
||||
ip.mi.dy = (LONG)remote_action.m.y;
|
||||
if (remote_action.m.flag == MouseFlag::left_down) {
|
||||
ip.mi.dwFlags = MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE;
|
||||
} else if (remote_action.m.flag == MouseFlag::left_up) {
|
||||
|
||||
Reference in New Issue
Block a user