From 96a2717b3caeba7ecfa478e4d8dc5cf5c19d423f Mon Sep 17 00:00:00 2001 From: Martin Fleisz Date: Wed, 13 Mar 2013 15:08:45 +0100 Subject: [PATCH] iOS: Compile fixes (Fixed #1069, #1086) --- client/iOS/Models/RDPKeyboard.m | 6 +++--- winpr/libwinpr/utils/print.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/iOS/Models/RDPKeyboard.m b/client/iOS/Models/RDPKeyboard.m index 89c62edc0..b896596e0 100644 --- a/client/iOS/Models/RDPKeyboard.m +++ b/client/iOS/Models/RDPKeyboard.m @@ -286,14 +286,14 @@ // sends the vk code to the session - (void)sendVirtualKey:(int)vKey up:(BOOL)up { - RDP_SCANCODE scancode = freerdp_keyboard_get_rdp_scancode_from_virtual_key_code(vKey); + DWORD scancode = GetVirtualScanCodeFromVirtualKeyCode(vKey, 4); int flags = (up ? KBD_FLAGS_RELEASE : KBD_FLAGS_DOWN); - flags |= (RDP_SCANCODE_EXTENDED(scancode) ? KBD_FLAGS_EXTENDED : 0); + flags |= ((scancode & KBDEXT) ? KBD_FLAGS_EXTENDED : 0); [_session sendInputEvent:[NSDictionary dictionaryWithObjectsAndKeys: @"keyboard", @"type", @"scancode", @"subtype", [NSNumber numberWithUnsignedShort:flags], @"flags", - [NSNumber numberWithUnsignedShort:RDP_SCANCODE_CODE(scancode)], @"scancode", + [NSNumber numberWithUnsignedShort:(scancode & 0xFF)], @"scancode", nil]]; } diff --git a/winpr/libwinpr/utils/print.c b/winpr/libwinpr/utils/print.c index f7863f268..73f913b8f 100644 --- a/winpr/libwinpr/utils/print.c +++ b/winpr/libwinpr/utils/print.c @@ -386,7 +386,7 @@ static int vsprintf_help(unsigned c, void **ptr) return 0; } -int vsprintf(char *buf, const char *fmt, va_list args) +int wvsprintfx(char *buf, const char *fmt, va_list args) { int status; @@ -401,7 +401,7 @@ static int discard(unsigned c_UNUSED, void **ptr_UNUSED) return 0; } -int sprintf(char *buf, const char *fmt, ...) +int wsprintfx(char *buf, const char *fmt, ...) { va_list args; int status; @@ -424,7 +424,7 @@ int vprintf_help(unsigned c, void **ptr_UNUSED) return 0; } -int vprintf(const char *fmt, va_list args) +int wvprintfx(const char *fmt, va_list args) { return do_printf(fmt, args, vprintf_help, NULL); } @@ -435,7 +435,7 @@ int wprintfx(const char *fmt, ...) int status; va_start(args, fmt); - status = vprintf(fmt, args); + status = wvprintfx(fmt, args); va_end(args); return status;