mirror of
https://gitlab.com/ita1024/waf.git
synced 2025-01-08 09:25:08 +01:00
FillConsoleOutputCharacterA seems to be requiring a c_char, not a c_wchar
This commit is contained in:
parent
001488b8d3
commit
5c85d5907d
@ -11,13 +11,13 @@ console commands.
|
||||
|
||||
"""
|
||||
|
||||
import re, sys, time
|
||||
import re, sys
|
||||
from waflib.Utils import threading
|
||||
|
||||
wlock = threading.Lock()
|
||||
|
||||
try:
|
||||
from ctypes import Structure, windll, c_short, c_ushort, c_ulong, c_int, byref, c_wchar, GetLastError, POINTER, c_long
|
||||
from ctypes import Structure, windll, c_short, c_ushort, c_ulong, c_int, byref, c_char, POINTER, c_long
|
||||
except ImportError:
|
||||
|
||||
class AnsiTerm(object):
|
||||
@ -126,7 +126,7 @@ else:
|
||||
line_start = sbinfo.CursorPosition
|
||||
line_length = sbinfo.Size.X - sbinfo.CursorPosition.X
|
||||
chars_written = c_int()
|
||||
windll.kernel32.FillConsoleOutputCharacterA(self.hconsole, c_wchar(' '), line_length, line_start, byref(chars_written))
|
||||
windll.kernel32.FillConsoleOutputCharacterA(self.hconsole, c_char(' '), line_length, line_start, byref(chars_written))
|
||||
windll.kernel32.FillConsoleOutputAttribute(self.hconsole, sbinfo.Attributes, line_length, line_start, byref(chars_written))
|
||||
|
||||
def clear_screen(self, param):
|
||||
@ -143,7 +143,7 @@ else:
|
||||
clear_start = sbinfo.CursorPosition
|
||||
clear_length = ((sbinfo.Size.X - sbinfo.CursorPosition.X) + sbinfo.Size.X * (sbinfo.Size.Y - sbinfo.CursorPosition.Y))
|
||||
chars_written = c_int()
|
||||
windll.kernel32.FillConsoleOutputCharacterA(self.hconsole, c_wchar(' '), clear_length, clear_start, byref(chars_written))
|
||||
windll.kernel32.FillConsoleOutputCharacterA(self.hconsole, c_char(' '), clear_length, clear_start, byref(chars_written))
|
||||
windll.kernel32.FillConsoleOutputAttribute(self.hconsole, sbinfo.Attributes, clear_length, clear_start, byref(chars_written))
|
||||
|
||||
def push_cursor(self, param):
|
||||
|
Loading…
Reference in New Issue
Block a user