Windows only fix - mute button now works

This commit is contained in:
Timothy GFO 2023-11-09 17:36:44 -04:00
parent a785b112c7
commit 0f1a2545d2
2 changed files with 8 additions and 2 deletions

View file

@ -120,7 +120,11 @@ def restore_ogmusic(path):
def nsf_changer (nsf_path, megamaker_folder):
original_path = check_folder_structure(megamaker_folder)
if original_path:
if os.path.commonpath([os.path.dirname(nsf_path), os.path.join(megamaker_folder, "Music")]) == os.path.join(megamaker_folder, "Music"):
try:
common = os.path.commonpath([os.path.dirname(nsf_path), os.path.join(megamaker_folder, "Music")])
except ValueError:
common = False
if common == os.path.join(megamaker_folder, "Music"):
restore_ogmusic(megamaker_folder)
shutil.copy(nsf_path, os.path.join(megamaker_folder, os.path.basename(nsf_path)))
nsf_path = os.path.join(megamaker_folder, os.path.basename(nsf_path))
@ -162,7 +166,7 @@ how_to_use = "I made this tool to be able to change the music for any Mega Man M
app_version = "v1.1"
window = sg.Window(f"MMM NSF Music Changer {app_version}", layout, grab_anywhere=True)
window = sg.Window(f"MMM NSF Music Changer {app_version}", layout)
disclaimer = sg.popup_yes_no('NSF Changer, by Timothy GFO', 'This program is not complete, there WILL be bugs. Use at your own risk.', 'Do you want to continue?')
while disclaimer == "Yes":
event,values = window.read(timeout=50)