Fix formatting issues introduced through previous commit (cf630f).

This commit is contained in:
Michael Jumper 2013-02-09 16:46:29 -08:00
parent 50ed651c1f
commit 7fbd425610
2 changed files with 27 additions and 27 deletions

View File

@ -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;

View File

@ -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) {