Author: hbelusca
Date: Mon Aug 11 15:37:01 2014
New Revision: 63865
URL:
http://svn.reactos.org/svn/reactos?rev=63865&view=rev
Log:
[CONSRV]: Support reverse video bit COMMON_LVB_REVERSE_VIDEO
Modified:
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/settings.h
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/settings.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/settings.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/settings.h [iso-8859-1]
Mon Aug 11 15:37:01 2014
@@ -51,10 +51,14 @@
WCHAR ConsoleTitle[MAX_PATH + 1];
} CONSOLE_INFO, *PCONSOLE_INFO;
+/*
+ * BYTE Foreground = LOBYTE(Attributes) & 0x0F;
+ * BYTE Background = (LOBYTE(Attributes) & 0xF0) >> 4;
+ */
#define RGBFromAttrib(Console, Attribute) ((Console)->Colors[(Attribute) &
0xF])
-#define TextAttribFromAttrib(Attribute) ((Attribute) & 0xF)
-#define BkgdAttribFromAttrib(Attribute) (((Attribute) >> 4) & 0xF)
-#define MakeAttrib(TextAttrib, BkgdAttrib) (DWORD)((((BkgdAttrib) & 0xF) << 4)
| ((TextAttrib) & 0xF))
+#define TextAttribFromAttrib(Attribute) ( !((Attribute) &
COMMON_LVB_REVERSE_VIDEO) ? (Attribute) & 0xF : ((Attribute) >> 4) & 0xF )
+#define BkgdAttribFromAttrib(Attribute) ( !((Attribute) &
COMMON_LVB_REVERSE_VIDEO) ? ((Attribute) >> 4) & 0xF : (Attribute) & 0xF )
+#define MakeAttrib(TextAttrib, BkgdAttrib) (USHORT)((((BkgdAttrib) & 0xF) <<
4) | ((TextAttrib) & 0xF))
/*
* Structure used to communicate with console.dll