Index: base/applications/mstsc/uimain.c =================================================================== --- base/applications/mstsc/uimain.c (revision 74470) +++ base/applications/mstsc/uimain.c (working copy) @@ -199,7 +199,7 @@ { bs_set_pixel_on(am, j, 31 - i, 32, 1, 1); } - if (bs_is_pixel_on((char *)xormask, j, i, 32, 24)) + if (bs_is_pixel_on((char *)xormask, j, i, 32, xor_bpp)) { bs_set_pixel_on(xm, j, 31 - i, 32, 1, 1); } Index: base/applications/mstsc/win32.c =================================================================== --- base/applications/mstsc/win32.c (revision 74470) +++ base/applications/mstsc/win32.c (working copy) @@ -886,6 +886,7 @@ int red; int green; int blue; + int index; ZeroMemory(&bi, sizeof(bi)); bi.bmiHeader.biSize = sizeof(bi.bmiHeader); @@ -942,8 +943,23 @@ } } } - else if (g_server_depth == 24 || g_server_depth == 32) + else if (g_server_depth == 24) { + for (i = cy - 1; i >= 0; i--) + { + for (j = cx - 1; j >= 0; j--) + { + index = (i * cx + j) * 3; + red = ((unsigned char*)data)[index + 2]; + green = ((unsigned char*)data)[index + 1]; + blue = ((unsigned char*)data)[index]; + MAKE_COLOUR32(colour, red, green, blue); + ((unsigned int*)bits)[i * cx + j] = colour; + } + } + } + else if (g_server_depth == 32) + { memcpy(bits, data, cx*cy*4); } dc = CreateCompatibleDC(maindc);