From 7fbd425610b0f325132470ea842ad8d0bcf2c9a6 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 9 Feb 2013 16:46:29 -0800 Subject: [PATCH] Fix formatting issues introduced through previous commit (cf630f). --- protocols/vnc/src/client.c | 4 +-- protocols/vnc/src/vnc_handlers.c | 50 ++++++++++++++++---------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/protocols/vnc/src/client.c b/protocols/vnc/src/client.c index eb12ee3d..d2219b9a 100644 --- a/protocols/vnc/src/client.c +++ b/protocols/vnc/src/client.c @@ -119,9 +119,9 @@ int guac_client_init(guac_client* client, int argc, char** argv) { /* Password */ rfb_client->GetPassword = guac_vnc_get_password; - /* Depth */ + /* Depth */ guac_vnc_set_pixel_format(rfb_client, atoi(argv[6])); - + /* Hook into allocation so we can handle resize. */ guac_client_data->rfb_MallocFrameBuffer = rfb_client->MallocFrameBuffer; rfb_client->MallocFrameBuffer = guac_vnc_malloc_framebuffer; diff --git a/protocols/vnc/src/vnc_handlers.c b/protocols/vnc/src/vnc_handlers.c index f03e8b0c..11448d41 100644 --- a/protocols/vnc/src/vnc_handlers.c +++ b/protocols/vnc/src/vnc_handlers.c @@ -254,39 +254,39 @@ char* guac_vnc_get_password(rfbClient* client) { void guac_vnc_set_pixel_format(rfbClient* client, int color_depth) { switch(color_depth) { case 8: - client->format.depth = 8; + client->format.depth = 8; client->format.bitsPerPixel = 8; - client->format.blueShift = 6; - client->format.redShift = 0; - client->format.greenShift = 3; - client->format.blueMax = 3; - client->format.redMax = 7; - client->format.greenMax = 7; - break; + client->format.blueShift = 6; + client->format.redShift = 0; + client->format.greenShift = 3; + client->format.blueMax = 3; + client->format.redMax = 7; + client->format.greenMax = 7; + break; case 16: - client->format.depth = 16; + client->format.depth = 16; client->format.bitsPerPixel = 16; - client->format.blueShift = 0; - client->format.redShift = 11; - client->format.greenShift = 5; - client->format.blueMax = 0x1f; - client->format.redMax = 0x1f; - client->format.greenMax = 0x3f; - break; + client->format.blueShift = 0; + client->format.redShift = 11; + client->format.greenShift = 5; + client->format.blueMax = 0x1f; + client->format.redMax = 0x1f; + client->format.greenMax = 0x3f; + break; - case 24: + case 24: case 32: default: - client->format.depth = 24; + client->format.depth = 24; client->format.bitsPerPixel = 32; - client->format.blueShift = 0; - client->format.redShift = 16; - client->format.greenShift = 8; - client->format.blueMax = 0xff; - client->format.redMax = 0xff; - client->format.greenMax = 0xff; - } + client->format.blueShift = 0; + client->format.redShift = 16; + client->format.greenShift = 8; + client->format.blueMax = 0xff; + client->format.redMax = 0xff; + client->format.greenMax = 0xff; + } } rfbBool guac_vnc_malloc_framebuffer(rfbClient* rfb_client) {