From 002f4a7868ccf03c74115dbf784ca89efa631c76 Mon Sep 17 00:00:00 2001 From: Taiko2k Date: Sat, 23 Sep 2023 14:12:38 +1200 Subject: [PATCH] Fix vista crash --- t_modules/t_main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t_modules/t_main.py b/t_modules/t_main.py index 24869e537..0992a8754 100644 --- a/t_modules/t_main.py +++ b/t_modules/t_main.py @@ -582,6 +582,11 @@ def asset_loader(name, mod=False): musicbrainzngs.set_useragent("TauonMusicBox", n_version, "https://github.com/Taiko2k/TauonMusicBox") arch = platform.machine() +win_ver = platform.release() +try: + win_ver = int(win_ver) +except: + win_ver = 0 # print(arch) @@ -4262,7 +4267,7 @@ def load_prefs(): smtc = False -if msys and int(py_platform.release()) >= 10: +if msys and win_ver >= 10: #print(sss.info.win.window) try: @@ -9339,7 +9344,7 @@ def stop(self): tray.start() - if int(py_platform.release()) < 10: + if win_ver < 10: import keyboard def key_callback(event):