Reformatted file.

This commit is contained in:
Armin Novak 2016-10-04 09:00:00 +02:00
parent b0b32734ad
commit 4d179fd88a

View File

@ -194,7 +194,7 @@ DWORD mac_client_thread(void* param)
if (settings->AsyncInput) if (settings->AsyncInput)
{ {
if (!(inputThread = CreateThread(NULL, 0, if (!(inputThread = CreateThread(NULL, 0,
(LPTHREAD_START_ROUTINE) mac_client_input_thread, context, 0, NULL))) (LPTHREAD_START_ROUTINE) mac_client_input_thread, context, 0, NULL)))
{ {
WLog_ERR(TAG, "failed to create async input thread"); WLog_ERR(TAG, "failed to create async input thread");
goto disconnect; goto disconnect;
@ -203,7 +203,7 @@ DWORD mac_client_thread(void* param)
else else
{ {
if (!(inputEvent = freerdp_get_message_queue_event_handle(instance, if (!(inputEvent = freerdp_get_message_queue_event_handle(instance,
FREERDP_INPUT_MESSAGE_QUEUE))) FREERDP_INPUT_MESSAGE_QUEUE)))
{ {
WLog_ERR(TAG, "failed to get input event handle"); WLog_ERR(TAG, "failed to get input event handle");
goto disconnect; goto disconnect;
@ -221,7 +221,7 @@ DWORD mac_client_thread(void* param)
if (!settings->AsyncTransport) if (!settings->AsyncTransport)
{ {
if (!(nCountTmp = freerdp_get_event_handles(context, &events[nCount], if (!(nCountTmp = freerdp_get_event_handles(context, &events[nCount],
16 - nCount))) 16 - nCount)))
{ {
WLog_ERR(TAG, "freerdp_get_event_handles failed"); WLog_ERR(TAG, "freerdp_get_event_handles failed");
break; break;
@ -945,14 +945,13 @@ BOOL mac_post_connect(freerdp* instance)
rdp_pointer.SetDefault = mf_Pointer_SetDefault; rdp_pointer.SetDefault = mf_Pointer_SetDefault;
settings = instance->settings; settings = instance->settings;
if (!gdi_init(instance, PIXEL_FORMAT_BGRX32)) if (!gdi_init(instance, PIXEL_FORMAT_BGRX32))
return FALSE; return FALSE;
gdi = instance->context->gdi; gdi = instance->context->gdi;
view->bitmap_context = mac_create_bitmap_context(instance->context); view->bitmap_context = mac_create_bitmap_context(instance->context);
pointer_cache_register_callbacks(instance->update); pointer_cache_register_callbacks(instance->update);
graphics_register_pointer(instance->context->graphics, &rdp_pointer); graphics_register_pointer(instance->context->graphics, &rdp_pointer);
/* setup pasteboard (aka clipboard) for copy operations (write only) */ /* setup pasteboard (aka clipboard) for copy operations (write only) */
view->pasteboard_wr = [NSPasteboard generalPasteboard]; view->pasteboard_wr = [NSPasteboard generalPasteboard];
/* setup pasteboard for read operations */ /* setup pasteboard for read operations */
@ -1000,7 +999,7 @@ BOOL mac_authenticate(freerdp* instance, char** username, char** password,
BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer) BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer)
{ {
rdpGdi* gdi; rdpGdi* gdi;
NSRect rect; NSRect rect;
NSImage* image; NSImage* image;
NSPoint hotSpot; NSPoint hotSpot;
@ -1010,17 +1009,17 @@ BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer)
NSBitmapImageRep* bmiRep; NSBitmapImageRep* bmiRep;
MRDPCursor* mrdpCursor = [[MRDPCursor alloc] init]; MRDPCursor* mrdpCursor = [[MRDPCursor alloc] init];
mfContext* mfc = (mfContext*) context; mfContext* mfc = (mfContext*) context;
MRDPView* view; MRDPView* view;
UINT32 format; UINT32 format;
if (!mfc || !context || !pointer) if (!mfc || !context || !pointer)
return FALSE; return FALSE;
view = (MRDPView*) mfc->view; view = (MRDPView*) mfc->view;
gdi = context->gdi; gdi = context->gdi;
if (!gdi || !view) if (!gdi || !view)
return FALSE; return FALSE;
rect.size.width = pointer->width; rect.size.width = pointer->width;
rect.size.height = pointer->height; rect.size.height = pointer->height;
@ -1032,11 +1031,11 @@ BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer)
return FALSE; return FALSE;
mrdpCursor->cursor_data = cursor_data; mrdpCursor->cursor_data = cursor_data;
format = PIXEL_FORMAT_RGBA32;
format = PIXEL_FORMAT_RGBA32;
if (freerdp_image_copy_from_pointer_data( if (freerdp_image_copy_from_pointer_data(
cursor_data, format, cursor_data, format,
0, 0, 0, pointer->width, pointer->height, 0, 0, 0, pointer->width, pointer->height,
pointer->xorMaskData, pointer->lengthXorMask, pointer->xorMaskData, pointer->lengthXorMask,
pointer->andMaskData, pointer->lengthAndMask, pointer->andMaskData, pointer->lengthAndMask,
pointer->xorBpp, NULL) < 0) pointer->xorBpp, NULL) < 0)
@ -1057,7 +1056,7 @@ BOOL mf_Pointer_New(rdpContext* context, rdpPointer* pointer)
isPlanar:NO isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace colorSpaceName:NSDeviceRGBColorSpace
bitmapFormat:0 bitmapFormat:0
bytesPerRow:rect.size.width * GetBytesPerPixel(format) bytesPerRow:rect.size.width * GetBytesPerPixel(format)
bitsPerPixel:0]; bitsPerPixel:0];
mrdpCursor->bmiRep = bmiRep; mrdpCursor->bmiRep = bmiRep;
/* create an image using above representation */ /* create an image using above representation */