mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[MSTSC]: Add support for 32-bit colour. Patch by 'hater'.
CORE-9322 #resolve #comment Committed in r66584, thanks! svn path=/trunk/; revision=66584
This commit is contained in:
parent
b8571b27e9
commit
a2a0e1c9a1
29 changed files with 53 additions and 26 deletions
|
@ -228,13 +228,7 @@ bs_is_pixel_on(char * data, int x, int y, int width, int bpp)
|
|||
return data[(y * 2) * width + (x * 2)] != 0 ||
|
||||
data[(y * 2) * width + (x * 2) + 1] != 0;
|
||||
}
|
||||
else if (bpp == 24)
|
||||
{
|
||||
return data[(y * 3) * width + (x * 3)] != 0 ||
|
||||
data[(y * 3) * width + (x * 3) + 1] != 0 ||
|
||||
data[(y * 3) * width + (x * 3) + 2] != 0;
|
||||
}
|
||||
else if (bpp == 32)
|
||||
else if (bpp == 24 || bpp == 32)
|
||||
{
|
||||
return data[(y * 4) * width + (x * 4)] != 0 ||
|
||||
data[(y * 4) * width + (x * 4) + 1] != 0 ||
|
||||
|
@ -277,6 +271,10 @@ bs_set_pixel_on(char * data, int x, int y, int width, int bpp,
|
|||
{
|
||||
((unsigned short *) data)[y * width + x] = pixel;
|
||||
}
|
||||
else if (bpp == 24 || bpp == 32)
|
||||
{
|
||||
((unsigned int *) data)[y * width + x] = (unsigned int) pixel;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -669,7 +669,7 @@ FillResolutionsAndColors(PINFO pInfo)
|
|||
PSETTINGS_ENTRY Current;
|
||||
DWORD index, i, num;
|
||||
DWORD MaxBpp = 0;
|
||||
UINT types[4];
|
||||
UINT types[5];
|
||||
|
||||
pInfo->CurrentDisplayDevice = pInfo->DisplayDeviceList; /* Update global variable */
|
||||
|
||||
|
@ -686,10 +686,11 @@ FillResolutionsAndColors(PINFO pInfo)
|
|||
}
|
||||
switch (MaxBpp)
|
||||
{
|
||||
case 32:
|
||||
case 24: num = 4; break;
|
||||
case 16: num = 3; break;
|
||||
case 8: num = 1; break;
|
||||
case 32: num = 4; break;
|
||||
case 24: num = 3; break;
|
||||
case 16: num = 2; break;
|
||||
case 15: num = 1; break;
|
||||
case 8: num = 0; break;
|
||||
default: num = 0; break;
|
||||
}
|
||||
|
||||
|
@ -697,6 +698,7 @@ FillResolutionsAndColors(PINFO pInfo)
|
|||
types[1] = IDS_HIGHCOLOR15;
|
||||
types[2] = IDS_HIGHCOLOR16;
|
||||
types[3] = IDS_HIGHCOLOR24;
|
||||
types[4] = IDS_HIGHCOLOR32;
|
||||
|
||||
/* Fill color depths combo box */
|
||||
SendDlgItemMessageW(pInfo->hDisplayPage,
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "Висока цветност (15 разряда)"
|
||||
IDS_HIGHCOLOR16 "Висока цветност (16 разряда)"
|
||||
IDS_HIGHCOLOR24 "Истинска цветност (24 разряда)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu точки"
|
||||
IDS_FULLSCREEN "Цял екран"
|
||||
IDS_BROWSESERVER "<Обзор за още...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 Colors (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Colors (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Colors (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixels"
|
||||
IDS_FULLSCREEN "Pantalla Complerta"
|
||||
IDS_BROWSESERVER "<Navega per més...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 Barev (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Barev (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Barev (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixelů"
|
||||
IDS_FULLSCREEN "Celá obrazovka"
|
||||
IDS_BROWSESERVER "<Najít další...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 Farben (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Farben (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Farben (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixel"
|
||||
IDS_FULLSCREEN "Vollbild"
|
||||
IDS_BROWSESERVER "<Nach mehr suchen...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 χρώματα (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 χρώματα (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 χρώματα (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixels"
|
||||
IDS_FULLSCREEN "Πλήρης οθόνη"
|
||||
IDS_BROWSESERVER "<Αναζήτηση για περισσότερα...>"
|
||||
|
|
|
@ -52,9 +52,10 @@ BEGIN
|
|||
IDS_TAB_GENERAL "General"
|
||||
IDS_TAB_DISPLAY "Display"
|
||||
IDS_256COLORS "256 Colors"
|
||||
IDS_HIGHCOLOR15 "32,768 Colors (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Colors (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Colors (24 bit)"
|
||||
IDS_HIGHCOLOR15 "High Color (15 bit)"
|
||||
IDS_HIGHCOLOR16 "High Color (16 bit)"
|
||||
IDS_HIGHCOLOR24 "True Color (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixels"
|
||||
IDS_FULLSCREEN "Full Screen"
|
||||
IDS_BROWSESERVER "<Browse for more...>"
|
||||
|
|
|
@ -57,6 +57,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 colores (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 colores (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 colores (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu píxeles"
|
||||
IDS_FULLSCREEN "Pantalla completa"
|
||||
IDS_BROWSESERVER "<Buscar más...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 Couleurs (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Couleurs (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Couleurs (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixels"
|
||||
IDS_FULLSCREEN "Plein écran"
|
||||
IDS_BROWSESERVER "<Parcourir pour plus...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 צבעים (15 סיביות)"
|
||||
IDS_HIGHCOLOR16 "65,536 צבעים (16 סיביות)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 צבעים (24 סיביות)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu פיקסלים"
|
||||
IDS_FULLSCREEN "מסך מלא"
|
||||
IDS_BROWSESERVER "<Browse for more...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 colori (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65.536 colori (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 colori (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixel"
|
||||
IDS_FULLSCREEN "Schermo Intero"
|
||||
IDS_BROWSESERVER "<Cerca...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 色 (15 ビット)"
|
||||
IDS_HIGHCOLOR16 "65,536 色 (16 ビット)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 色 (24 ビット)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lu x %lu ピクセル"
|
||||
IDS_FULLSCREEN "全画面表示"
|
||||
IDS_BROWSESERVER "<参照...>"
|
||||
|
|
|
@ -57,6 +57,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 색 (15 비트)"
|
||||
IDS_HIGHCOLOR16 "65,536 색 (16 비트)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 색 (24 비트)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu 픽셀"
|
||||
IDS_FULLSCREEN "최대 화면"
|
||||
IDS_BROWSESERVER "<더 많이...>"
|
||||
|
|
|
@ -57,6 +57,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 spalvos (15 bitų)"
|
||||
IDS_HIGHCOLOR16 "65,536 spalvos (16 bitų)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 spalvų (24 bitai)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu taškų"
|
||||
IDS_FULLSCREEN "Visas ekranas"
|
||||
IDS_BROWSESERVER "<Daugiau...>"
|
||||
|
|
|
@ -55,6 +55,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 Farger (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Farger (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Farger (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Piksler"
|
||||
IDS_FULLSCREEN "Full skjerm"
|
||||
IDS_BROWSESERVER "<Bla gjennom etter flere...>"
|
||||
|
|
|
@ -65,6 +65,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 kolorów (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 kolorów (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 kolorów (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu pikseli"
|
||||
IDS_FULLSCREEN "Pełny ekran"
|
||||
IDS_BROWSESERVER "<Wybierz inne...>"
|
||||
|
|
|
@ -62,6 +62,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 culori (15 biți)"
|
||||
IDS_HIGHCOLOR16 "65,536 culori (16 biți)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 culori (24 biți)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu pixeli"
|
||||
IDS_FULLSCREEN "Pe tot ecranul"
|
||||
IDS_BROWSESERVER "<Căutare mai multe…>"
|
||||
|
|
|
@ -57,6 +57,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 цветов (15 бит)"
|
||||
IDS_HIGHCOLOR16 "65,536 цветов (16 бит)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 цветов (24 бит)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lu на %lu пикселей"
|
||||
IDS_FULLSCREEN "Полный экран"
|
||||
IDS_BROWSESERVER "<Указать путь...>"
|
||||
|
|
|
@ -59,6 +59,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 farieb (15 bitov)"
|
||||
IDS_HIGHCOLOR16 "65,536 farieb (16 bitov)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 farieb (24 bitov)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu pixelov"
|
||||
IDS_FULLSCREEN "Celá obrazovka"
|
||||
IDS_BROWSESERVER "<Prehľadávať pre viac...>"
|
||||
|
|
|
@ -59,6 +59,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 Ngjyra (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Ngjyra (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Ngjyra (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixels"
|
||||
IDS_FULLSCREEN "Ekran i plote"
|
||||
IDS_BROWSESERVER "<Shfleto për më shume...>"
|
||||
|
|
|
@ -62,6 +62,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 Färger (15 bit)"
|
||||
IDS_HIGHCOLOR16 "65,536 Färger (16 bit)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 Färger (24 bit)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu Pixlar"
|
||||
IDS_FULLSCREEN "Fullskärm"
|
||||
IDS_BROWSESERVER "<Bläddra efter fler...>"
|
||||
|
|
|
@ -57,6 +57,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 (15 Bitlik) Renk"
|
||||
IDS_HIGHCOLOR16 "65,536 (16 Bitlik) Renk"
|
||||
IDS_HIGHCOLOR24 "16,777,216 (24 Bitlik) Renk"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lu*%lu Nokta"
|
||||
IDS_FULLSCREEN "Tüm Görüntülük"
|
||||
IDS_BROWSESERVER "(Daha Çoğu İçin Göz At...)"
|
||||
|
|
|
@ -63,6 +63,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 кольорів (15 біт)"
|
||||
IDS_HIGHCOLOR16 "65,536 кольорів (16 біт)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 кольорів (24 біти)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lu на %lu крапок"
|
||||
IDS_FULLSCREEN "На весь екран"
|
||||
IDS_BROWSESERVER "<Пошук інших...>"
|
||||
|
|
|
@ -57,6 +57,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 色 (15 位)"
|
||||
IDS_HIGHCOLOR16 "65,536 色 (16 位)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 色 (24 位)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu 像素"
|
||||
IDS_FULLSCREEN "全屏"
|
||||
IDS_BROWSESERVER "<浏览更多...>"
|
||||
|
|
|
@ -62,6 +62,7 @@ BEGIN
|
|||
IDS_HIGHCOLOR15 "32,768 色 (15 位元)"
|
||||
IDS_HIGHCOLOR16 "65,536 色 (16 位元)"
|
||||
IDS_HIGHCOLOR24 "16,777,216 色 (24 位元)"
|
||||
IDS_HIGHCOLOR32 "Highest Quality (32 bit)"
|
||||
IDS_PIXEL "%lux%lu 像素"
|
||||
IDS_FULLSCREEN "全屏幕"
|
||||
IDS_BROWSESERVER "<瀏覽更多...>"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define IDS_HIGHCOLOR15 15
|
||||
#define IDS_HIGHCOLOR16 16
|
||||
#define IDS_HIGHCOLOR24 24
|
||||
#define IDS_HIGHCOLOR32 32
|
||||
|
||||
#define IDD_CONNECTDIALOG 101
|
||||
#define IDD_GENERAL 105
|
||||
|
|
|
@ -38,8 +38,7 @@ RD_BOOL g_bitmap_cache_persist_enable = False;
|
|||
RD_BOOL g_bitmap_cache_precache = True;
|
||||
RD_BOOL g_bitmap_cache = True;
|
||||
RD_BOOL g_encryption = True;
|
||||
int g_server_depth = 8;
|
||||
RD_BOOL g_use_rdp5 = False;
|
||||
int g_server_depth = 16;
|
||||
int g_width = 800;
|
||||
int g_height = 600;
|
||||
uint32 g_keylayout = 0x409; /* Defaults to US keyboard layout */
|
||||
|
|
|
@ -942,6 +942,10 @@ mi_paint_rect(char * data, int width, int height, int x, int y, int cx, int cy)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (g_server_depth == 24 || g_server_depth == 32)
|
||||
{
|
||||
memcpy(bits, data, cx*cy*4);
|
||||
}
|
||||
dc = CreateCompatibleDC(maindc);
|
||||
if (dc == 0)
|
||||
{
|
||||
|
@ -1116,7 +1120,6 @@ wWinMain(HINSTANCE hInstance,
|
|||
strcpy(g_password, "");
|
||||
strcpy(g_hostname, tcp_get_address());
|
||||
g_server_depth = GetIntegerFromSettings(pRdpSettings, L"session bpp");
|
||||
if (g_server_depth > 16) g_server_depth = 16; /* hack, we don't support 24bpp yet */
|
||||
g_screen_width = GetSystemMetrics(SM_CXSCREEN);
|
||||
g_screen_height = GetSystemMetrics(SM_CYSCREEN);
|
||||
g_width = GetIntegerFromSettings(pRdpSettings, L"desktopwidth");
|
||||
|
@ -1192,11 +1195,11 @@ mi_fill_rect(int x, int y, int cx, int cy, int colour)
|
|||
{
|
||||
SPLIT_COLOUR16(colour, red, green, blue);
|
||||
}
|
||||
else
|
||||
else if (g_server_depth == 24 || g_server_depth == 32)
|
||||
{
|
||||
red = 0;
|
||||
green = 0;
|
||||
blue = 0;
|
||||
red = (colour>>16)&0xff;
|
||||
green = (colour>>8)&0xff;
|
||||
blue = colour&0xff;
|
||||
}
|
||||
maindc = GetWindowDC(g_Wnd);
|
||||
rgn = mi_clip(maindc);
|
||||
|
@ -1237,11 +1240,11 @@ mi_line(int x1, int y1, int x2, int y2, int colour)
|
|||
{
|
||||
SPLIT_COLOUR16(colour, red, green, blue);
|
||||
}
|
||||
else
|
||||
else if (g_server_depth == 24 || g_server_depth == 32)
|
||||
{
|
||||
red = 0;
|
||||
green = 0;
|
||||
blue = 0;
|
||||
red = (colour>>16)&0xff;
|
||||
green = (colour>>8)&0xff;
|
||||
blue = colour&0xff;
|
||||
}
|
||||
maindc = GetWindowDC(g_Wnd);
|
||||
rgn = mi_clip(maindc);
|
||||
|
|
Loading…
Reference in a new issue