mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[server] fix compilation errors after adding NONAMELESSUNION.
This commit is contained in:
@@ -29,17 +29,17 @@ BOOL wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT8 code)
|
||||
INPUT keyboard_event;
|
||||
WINPR_UNUSED(input);
|
||||
keyboard_event.type = INPUT_KEYBOARD;
|
||||
keyboard_event.ki.wVk = 0;
|
||||
keyboard_event.ki.wScan = code;
|
||||
keyboard_event.ki.dwFlags = KEYEVENTF_SCANCODE;
|
||||
keyboard_event.ki.dwExtraInfo = 0;
|
||||
keyboard_event.ki.time = 0;
|
||||
keyboard_event.u.ki.wVk = 0;
|
||||
keyboard_event.u.ki.wScan = code;
|
||||
keyboard_event.u.ki.dwFlags = KEYEVENTF_SCANCODE;
|
||||
keyboard_event.u.ki.dwExtraInfo = 0;
|
||||
keyboard_event.u.ki.time = 0;
|
||||
|
||||
if (flags & KBD_FLAGS_RELEASE)
|
||||
keyboard_event.ki.dwFlags |= KEYEVENTF_KEYUP;
|
||||
keyboard_event.u.ki.dwFlags |= KEYEVENTF_KEYUP;
|
||||
|
||||
if (flags & KBD_FLAGS_EXTENDED)
|
||||
keyboard_event.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY;
|
||||
keyboard_event.u.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY;
|
||||
|
||||
SendInput(1, &keyboard_event, sizeof(INPUT));
|
||||
return TRUE;
|
||||
@@ -50,14 +50,14 @@ BOOL wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
|
||||
INPUT keyboard_event;
|
||||
WINPR_UNUSED(input);
|
||||
keyboard_event.type = INPUT_KEYBOARD;
|
||||
keyboard_event.ki.wVk = 0;
|
||||
keyboard_event.ki.wScan = code;
|
||||
keyboard_event.ki.dwFlags = KEYEVENTF_UNICODE;
|
||||
keyboard_event.ki.dwExtraInfo = 0;
|
||||
keyboard_event.ki.time = 0;
|
||||
keyboard_event.u.ki.wVk = 0;
|
||||
keyboard_event.u.ki.wScan = code;
|
||||
keyboard_event.u.ki.dwFlags = KEYEVENTF_UNICODE;
|
||||
keyboard_event.u.ki.dwExtraInfo = 0;
|
||||
keyboard_event.u.ki.time = 0;
|
||||
|
||||
if (flags & KBD_FLAGS_RELEASE)
|
||||
keyboard_event.ki.dwFlags |= KEYEVENTF_KEYUP;
|
||||
keyboard_event.u.ki.dwFlags |= KEYEVENTF_KEYUP;
|
||||
|
||||
SendInput(1, &keyboard_event, sizeof(INPUT));
|
||||
return TRUE;
|
||||
@@ -74,11 +74,11 @@ BOOL wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
|
||||
|
||||
if (flags & PTR_FLAGS_WHEEL)
|
||||
{
|
||||
mouse_event.mi.dwFlags = MOUSEEVENTF_WHEEL;
|
||||
mouse_event.mi.mouseData = flags & WheelRotationMask;
|
||||
mouse_event.u.mi.dwFlags = MOUSEEVENTF_WHEEL;
|
||||
mouse_event.u.mi.mouseData = flags & WheelRotationMask;
|
||||
|
||||
if (flags & PTR_FLAGS_WHEEL_NEGATIVE)
|
||||
mouse_event.mi.mouseData *= -1;
|
||||
mouse_event.u.mi.mouseData *= -1;
|
||||
|
||||
SendInput(1, &mouse_event, sizeof(INPUT));
|
||||
}
|
||||
@@ -95,42 +95,42 @@ BOOL wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
|
||||
height = (float)GetSystemMetrics(SM_CYSCREEN);
|
||||
x += wfi->servscreen_xoffset;
|
||||
y += wfi->servscreen_yoffset;
|
||||
mouse_event.mi.dx = (LONG)((float)x * (65535.0f / width));
|
||||
mouse_event.mi.dy = (LONG)((float)y * (65535.0f / height));
|
||||
mouse_event.mi.dwFlags = MOUSEEVENTF_ABSOLUTE;
|
||||
mouse_event.u.mi.dx = (LONG)((float)x * (65535.0f / width));
|
||||
mouse_event.u.mi.dy = (LONG)((float)y * (65535.0f / height));
|
||||
mouse_event.u.mi.dwFlags = MOUSEEVENTF_ABSOLUTE;
|
||||
|
||||
if (flags & PTR_FLAGS_MOVE)
|
||||
{
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_MOVE;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_MOVE;
|
||||
SendInput(1, &mouse_event, sizeof(INPUT));
|
||||
}
|
||||
|
||||
mouse_event.mi.dwFlags = MOUSEEVENTF_ABSOLUTE;
|
||||
mouse_event.u.mi.dwFlags = MOUSEEVENTF_ABSOLUTE;
|
||||
|
||||
if (flags & PTR_FLAGS_BUTTON1)
|
||||
{
|
||||
if (flags & PTR_FLAGS_DOWN)
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_LEFTDOWN;
|
||||
else
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_LEFTUP;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_LEFTUP;
|
||||
|
||||
SendInput(1, &mouse_event, sizeof(INPUT));
|
||||
}
|
||||
else if (flags & PTR_FLAGS_BUTTON2)
|
||||
{
|
||||
if (flags & PTR_FLAGS_DOWN)
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_RIGHTDOWN;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_RIGHTDOWN;
|
||||
else
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_RIGHTUP;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_RIGHTUP;
|
||||
|
||||
SendInput(1, &mouse_event, sizeof(INPUT));
|
||||
}
|
||||
else if (flags & PTR_FLAGS_BUTTON3)
|
||||
{
|
||||
if (flags & PTR_FLAGS_DOWN)
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_MIDDLEDOWN;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_MIDDLEDOWN;
|
||||
else
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_MIDDLEUP;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_MIDDLEUP;
|
||||
|
||||
SendInput(1, &mouse_event, sizeof(INPUT));
|
||||
}
|
||||
@@ -160,23 +160,23 @@ BOOL wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT1
|
||||
height = (float)GetSystemMetrics(SM_CYSCREEN);
|
||||
x += wfi->servscreen_xoffset;
|
||||
y += wfi->servscreen_yoffset;
|
||||
mouse_event.mi.dx = (LONG)((float)x * (65535.0f / width));
|
||||
mouse_event.mi.dy = (LONG)((float)y * (65535.0f / height));
|
||||
mouse_event.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
|
||||
mouse_event.u.mi.dx = (LONG)((float)x * (65535.0f / width));
|
||||
mouse_event.u.mi.dy = (LONG)((float)y * (65535.0f / height));
|
||||
mouse_event.u.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE;
|
||||
SendInput(1, &mouse_event, sizeof(INPUT));
|
||||
}
|
||||
|
||||
mouse_event.mi.dx = mouse_event.mi.dy = mouse_event.mi.dwFlags = 0;
|
||||
mouse_event.u.mi.dx = mouse_event.u.mi.dy = mouse_event.u.mi.dwFlags = 0;
|
||||
|
||||
if (flags & PTR_XFLAGS_DOWN)
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_XDOWN;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_XDOWN;
|
||||
else
|
||||
mouse_event.mi.dwFlags |= MOUSEEVENTF_XUP;
|
||||
mouse_event.u.mi.dwFlags |= MOUSEEVENTF_XUP;
|
||||
|
||||
if (flags & PTR_XFLAGS_BUTTON1)
|
||||
mouse_event.mi.mouseData = XBUTTON1;
|
||||
mouse_event.u.mi.mouseData = XBUTTON1;
|
||||
else if (flags & PTR_XFLAGS_BUTTON2)
|
||||
mouse_event.mi.mouseData = XBUTTON2;
|
||||
mouse_event.u.mi.mouseData = XBUTTON2;
|
||||
|
||||
SendInput(1, &mouse_event, sizeof(INPUT));
|
||||
}
|
||||
|
||||
@@ -229,8 +229,8 @@ BOOL wf_mirror_driver_update(wfInfo* wfi, int mode)
|
||||
deviceMode->dmPelsWidth = wfi->virtscreen_width;
|
||||
deviceMode->dmPelsHeight = wfi->virtscreen_height;
|
||||
deviceMode->dmBitsPerPel = wfi->bitsPerPixel;
|
||||
deviceMode->dmPosition.x = wfi->servscreen_xoffset;
|
||||
deviceMode->dmPosition.y = wfi->servscreen_yoffset;
|
||||
deviceMode->u.s2.dmPosition.x = wfi->servscreen_xoffset;
|
||||
deviceMode->u.s2.dmPosition.y = wfi->servscreen_yoffset;
|
||||
}
|
||||
|
||||
deviceMode->dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_POSITION;
|
||||
|
||||
Reference in New Issue
Block a user