From f7ed21900436369386cac82fc62135541ec0466c Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 5 Jan 2014 21:41:57 +0100 Subject: [PATCH] Fix for color failures on Windows 7 64-bit --- waflib/ansiterm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/waflib/ansiterm.py b/waflib/ansiterm.py index f0c8dca5..9ee8e15e 100644 --- a/waflib/ansiterm.py +++ b/waflib/ansiterm.py @@ -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)