From a2a0e1c9a1c3ff722c80b1bec720082b2ca7c09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 6 Mar 2015 02:16:00 +0000 Subject: [PATCH] [MSTSC]: Add support for 32-bit colour. Patch by 'hater'. CORE-9322 #resolve #comment Committed in r66584, thanks! svn path=/trunk/; revision=66584 --- reactos/base/applications/mstsc/bsops.c | 12 +++++------ .../base/applications/mstsc/connectdialog.c | 12 ++++++----- reactos/base/applications/mstsc/lang/bg-BG.rc | 1 + reactos/base/applications/mstsc/lang/ca-ES.rc | 1 + reactos/base/applications/mstsc/lang/cs-CZ.rc | 1 + reactos/base/applications/mstsc/lang/de-DE.rc | 1 + reactos/base/applications/mstsc/lang/el-GR.rc | 1 + reactos/base/applications/mstsc/lang/en-US.rc | 7 ++++--- reactos/base/applications/mstsc/lang/es-ES.rc | 1 + reactos/base/applications/mstsc/lang/fr-FR.rc | 1 + reactos/base/applications/mstsc/lang/he-IL.rc | 1 + reactos/base/applications/mstsc/lang/it-IT.rc | 1 + reactos/base/applications/mstsc/lang/ja-JP.rc | 1 + reactos/base/applications/mstsc/lang/ko-KR.rc | 1 + reactos/base/applications/mstsc/lang/lt-LT.rc | 1 + reactos/base/applications/mstsc/lang/no-NO.rc | 1 + reactos/base/applications/mstsc/lang/pl-PL.rc | 1 + reactos/base/applications/mstsc/lang/ro-RO.rc | 1 + reactos/base/applications/mstsc/lang/ru-RU.rc | 1 + reactos/base/applications/mstsc/lang/sk-SK.rc | 1 + reactos/base/applications/mstsc/lang/sq-AL.rc | 1 + reactos/base/applications/mstsc/lang/sv-SE.rc | 1 + reactos/base/applications/mstsc/lang/tr-TR.rc | 1 + reactos/base/applications/mstsc/lang/uk-UA.rc | 1 + reactos/base/applications/mstsc/lang/zh-CN.rc | 1 + reactos/base/applications/mstsc/lang/zh-TW.rc | 1 + reactos/base/applications/mstsc/resource.h | 1 + reactos/base/applications/mstsc/uimain.c | 3 +-- reactos/base/applications/mstsc/win32.c | 21 +++++++++++-------- 29 files changed, 53 insertions(+), 26 deletions(-) diff --git a/reactos/base/applications/mstsc/bsops.c b/reactos/base/applications/mstsc/bsops.c index 5c85e547a93..440352073ed 100644 --- a/reactos/base/applications/mstsc/bsops.c +++ b/reactos/base/applications/mstsc/bsops.c @@ -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; + } } /*****************************************************************************/ diff --git a/reactos/base/applications/mstsc/connectdialog.c b/reactos/base/applications/mstsc/connectdialog.c index f01e145d0dc..b36152db507 100644 --- a/reactos/base/applications/mstsc/connectdialog.c +++ b/reactos/base/applications/mstsc/connectdialog.c @@ -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, diff --git a/reactos/base/applications/mstsc/lang/bg-BG.rc b/reactos/base/applications/mstsc/lang/bg-BG.rc index 6ff3ff9de73..b82b72827d0 100644 --- a/reactos/base/applications/mstsc/lang/bg-BG.rc +++ b/reactos/base/applications/mstsc/lang/bg-BG.rc @@ -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 "<Обзор за още...>" diff --git a/reactos/base/applications/mstsc/lang/ca-ES.rc b/reactos/base/applications/mstsc/lang/ca-ES.rc index a4f810c6bd4..aa9cbfc535c 100644 --- a/reactos/base/applications/mstsc/lang/ca-ES.rc +++ b/reactos/base/applications/mstsc/lang/ca-ES.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/cs-CZ.rc b/reactos/base/applications/mstsc/lang/cs-CZ.rc index 23ef12ba30a..bbe0da4e996 100644 --- a/reactos/base/applications/mstsc/lang/cs-CZ.rc +++ b/reactos/base/applications/mstsc/lang/cs-CZ.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/de-DE.rc b/reactos/base/applications/mstsc/lang/de-DE.rc index e7b9c5595fc..b47318b3f0d 100644 --- a/reactos/base/applications/mstsc/lang/de-DE.rc +++ b/reactos/base/applications/mstsc/lang/de-DE.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/el-GR.rc b/reactos/base/applications/mstsc/lang/el-GR.rc index 77f9a9897a1..ba385c491d6 100644 --- a/reactos/base/applications/mstsc/lang/el-GR.rc +++ b/reactos/base/applications/mstsc/lang/el-GR.rc @@ -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 "<Αναζήτηση για περισσότερα...>" diff --git a/reactos/base/applications/mstsc/lang/en-US.rc b/reactos/base/applications/mstsc/lang/en-US.rc index 70a2d4d8d06..c7ff469fdbb 100644 --- a/reactos/base/applications/mstsc/lang/en-US.rc +++ b/reactos/base/applications/mstsc/lang/en-US.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/es-ES.rc b/reactos/base/applications/mstsc/lang/es-ES.rc index 81c9c65a729..7596684f565 100644 --- a/reactos/base/applications/mstsc/lang/es-ES.rc +++ b/reactos/base/applications/mstsc/lang/es-ES.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/fr-FR.rc b/reactos/base/applications/mstsc/lang/fr-FR.rc index 78bf0a55f31..7b3ffc16cc8 100644 --- a/reactos/base/applications/mstsc/lang/fr-FR.rc +++ b/reactos/base/applications/mstsc/lang/fr-FR.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/he-IL.rc b/reactos/base/applications/mstsc/lang/he-IL.rc index c4bdcc6ba03..6b91bcfd6cf 100644 --- a/reactos/base/applications/mstsc/lang/he-IL.rc +++ b/reactos/base/applications/mstsc/lang/he-IL.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/it-IT.rc b/reactos/base/applications/mstsc/lang/it-IT.rc index 640f97683da..8f93aac8455 100644 --- a/reactos/base/applications/mstsc/lang/it-IT.rc +++ b/reactos/base/applications/mstsc/lang/it-IT.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/ja-JP.rc b/reactos/base/applications/mstsc/lang/ja-JP.rc index c730f3388dc..dc147e68d3a 100644 --- a/reactos/base/applications/mstsc/lang/ja-JP.rc +++ b/reactos/base/applications/mstsc/lang/ja-JP.rc @@ -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 "<参照...>" diff --git a/reactos/base/applications/mstsc/lang/ko-KR.rc b/reactos/base/applications/mstsc/lang/ko-KR.rc index 694ad748bb1..e609f0885f3 100644 --- a/reactos/base/applications/mstsc/lang/ko-KR.rc +++ b/reactos/base/applications/mstsc/lang/ko-KR.rc @@ -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 "<더 많이...>" diff --git a/reactos/base/applications/mstsc/lang/lt-LT.rc b/reactos/base/applications/mstsc/lang/lt-LT.rc index 86c1c975697..f57f1bbbaa2 100644 --- a/reactos/base/applications/mstsc/lang/lt-LT.rc +++ b/reactos/base/applications/mstsc/lang/lt-LT.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/no-NO.rc b/reactos/base/applications/mstsc/lang/no-NO.rc index baac954a0b4..047536088fe 100644 --- a/reactos/base/applications/mstsc/lang/no-NO.rc +++ b/reactos/base/applications/mstsc/lang/no-NO.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/pl-PL.rc b/reactos/base/applications/mstsc/lang/pl-PL.rc index 47e2aba7696..af6f28f062a 100644 --- a/reactos/base/applications/mstsc/lang/pl-PL.rc +++ b/reactos/base/applications/mstsc/lang/pl-PL.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/ro-RO.rc b/reactos/base/applications/mstsc/lang/ro-RO.rc index dfcf4648fa7..c45d26471e4 100644 --- a/reactos/base/applications/mstsc/lang/ro-RO.rc +++ b/reactos/base/applications/mstsc/lang/ro-RO.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/ru-RU.rc b/reactos/base/applications/mstsc/lang/ru-RU.rc index 71dfbab7e34..4e2741fafb5 100644 --- a/reactos/base/applications/mstsc/lang/ru-RU.rc +++ b/reactos/base/applications/mstsc/lang/ru-RU.rc @@ -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 "<Указать путь...>" diff --git a/reactos/base/applications/mstsc/lang/sk-SK.rc b/reactos/base/applications/mstsc/lang/sk-SK.rc index 451b6a187ad..c39605dc13c 100644 --- a/reactos/base/applications/mstsc/lang/sk-SK.rc +++ b/reactos/base/applications/mstsc/lang/sk-SK.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/sq-AL.rc b/reactos/base/applications/mstsc/lang/sq-AL.rc index 459636a76b2..6b29e38a963 100644 --- a/reactos/base/applications/mstsc/lang/sq-AL.rc +++ b/reactos/base/applications/mstsc/lang/sq-AL.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/sv-SE.rc b/reactos/base/applications/mstsc/lang/sv-SE.rc index 47077428379..c762fdaca56 100644 --- a/reactos/base/applications/mstsc/lang/sv-SE.rc +++ b/reactos/base/applications/mstsc/lang/sv-SE.rc @@ -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 "" diff --git a/reactos/base/applications/mstsc/lang/tr-TR.rc b/reactos/base/applications/mstsc/lang/tr-TR.rc index da164cf0862..90a92959c13 100644 --- a/reactos/base/applications/mstsc/lang/tr-TR.rc +++ b/reactos/base/applications/mstsc/lang/tr-TR.rc @@ -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...)" diff --git a/reactos/base/applications/mstsc/lang/uk-UA.rc b/reactos/base/applications/mstsc/lang/uk-UA.rc index 1b840432844..6b17145688b 100644 --- a/reactos/base/applications/mstsc/lang/uk-UA.rc +++ b/reactos/base/applications/mstsc/lang/uk-UA.rc @@ -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 "<Пошук інших...>" diff --git a/reactos/base/applications/mstsc/lang/zh-CN.rc b/reactos/base/applications/mstsc/lang/zh-CN.rc index ef4a821c20c..52b8dadebe5 100644 --- a/reactos/base/applications/mstsc/lang/zh-CN.rc +++ b/reactos/base/applications/mstsc/lang/zh-CN.rc @@ -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 "<浏览更多...>" diff --git a/reactos/base/applications/mstsc/lang/zh-TW.rc b/reactos/base/applications/mstsc/lang/zh-TW.rc index ecdd17eb862..df5b3efe8d3 100644 --- a/reactos/base/applications/mstsc/lang/zh-TW.rc +++ b/reactos/base/applications/mstsc/lang/zh-TW.rc @@ -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 "<瀏覽更多...>" diff --git a/reactos/base/applications/mstsc/resource.h b/reactos/base/applications/mstsc/resource.h index b3a7217b09a..52aefa25dc3 100644 --- a/reactos/base/applications/mstsc/resource.h +++ b/reactos/base/applications/mstsc/resource.h @@ -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 diff --git a/reactos/base/applications/mstsc/uimain.c b/reactos/base/applications/mstsc/uimain.c index 56b14ccdcb4..c2f034a5568 100644 --- a/reactos/base/applications/mstsc/uimain.c +++ b/reactos/base/applications/mstsc/uimain.c @@ -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 */ diff --git a/reactos/base/applications/mstsc/win32.c b/reactos/base/applications/mstsc/win32.c index 9bd9f36a1fa..0a588e03f7f 100644 --- a/reactos/base/applications/mstsc/win32.c +++ b/reactos/base/applications/mstsc/win32.c @@ -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);