2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-17 23:46:53 +01:00

Fix for color failures on Windows 7 64-bit

This commit is contained in:
Thomas Nagy 2014-01-05 21:41:57 +01:00
parent f5e26ff749
commit f7ed219004
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -17,6 +17,13 @@ try:
class CONSOLE_CURSOR_INFO(Structure):
_fields_ = [('dwSize',c_ulong), ('bVisible', c_int)]
windll.kernel32.GetStdHandle.argtypes = [c_ulong]
windll.kernel32.GetStdHandle.restype = c_ulong
windll.kernel32.GetConsoleScreenBufferInfo.argtypes = [c_ulong, POINTER(CONSOLE_SCREEN_BUFFER_INFO)]
windll.kernel32.GetConsoleScreenBufferInfo.restype = c_long
windll.kernel32.SetConsoleTextAttribute.argtypes = [c_ulong, c_ushort]
windll.kernel32.SetConsoleTextAttribute.restype = c_long
sbinfo = CONSOLE_SCREEN_BUFFER_INFO()
csinfo = CONSOLE_CURSOR_INFO()
hconsole = windll.kernel32.GetStdHandle(-11)