Skip to content

Commit

Permalink
Activate buffer only in frozen version
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed May 5, 2019
1 parent b1c3b38 commit 774940b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions CurseBreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,14 @@ def print_header(self):
f'{__version__}</ansibrightred> ~~~</ansibrightblack>\n'))

def setup_console(self, buffer=False):
if buffer:
windll.kernel32.SetConsoleScreenBufferSize(self.chandle, wintypes._COORD(100, 100))
if getattr(sys, 'frozen', False):
if buffer:
windll.kernel32.SetConsoleScreenBufferSize(self.chandle, wintypes._COORD(100, 100))
else:
windll.kernel32.SetConsoleWindowInfo(self.chandle, True, byref(wintypes.SMALL_RECT(0, 0, 99, 49)))
windll.kernel32.SetConsoleScreenBufferSize(self.chandle, wintypes._COORD(100, 50))
else:
windll.kernel32.SetConsoleWindowInfo(self.chandle, True, byref(wintypes.SMALL_RECT(0, 0, 99, 49)))
windll.kernel32.SetConsoleScreenBufferSize(self.chandle, wintypes._COORD(100, 50))
os.system('mode con: cols=100 lines=50')

def setup_completer(self):
commands = ['install', 'uninstall', 'update', 'force_update', 'status', 'orphans', 'search', 'toggle_backup',
Expand Down

0 comments on commit 774940b

Please sign in to comment.