diff --git a/RA3MP3Playback.py b/RA3MP3Playback.py index 1c3170a..0e8fe7b 100644 --- a/RA3MP3Playback.py +++ b/RA3MP3Playback.py @@ -89,19 +89,19 @@ ANSI_ESCAPE_RE = re.compile( # ========================================================== # ===================== UTILITY FUNCTIONS ================= -def apply_backspaces(s): - # Ensure we are working with str - if isinstance(s, bytes): - s = s.decode(errors="ignore") +# def apply_backspaces(s): +# # Ensure we are working with str +# if isinstance(s, bytes): +# s = s.decode(errors="ignore") - buf = [] - for c in s: - if c == "\x08": - if buf: - buf.pop() - else: - buf.append(c) - return "".join(buf) +# buf = [] +# for c in s: +# if c == "\x08": +# if buf: +# buf.pop() +# else: +# buf.append(c) +# return "".join(buf) def acquire_single_instance(lockfile_base: str): """ @@ -380,8 +380,8 @@ def monitor_game_pty(master_fd): while b"\n" in buffer: line, buffer = buffer.split(b"\n", 1) - if os.name != "nt": - line = apply_backspaces(line) + #if os.name != "nt": + # line = apply_backspaces(line) line = strip_ansi(line.decode(errors="ignore")).strip() if line: if "--debug" in sys.argv: