Skip to content

Commit

Permalink
Update WiiMusicEditorPlus.py
Browse files Browse the repository at this point in the history
  • Loading branch information
notBenjaminHalko committed Jan 7, 2022
1 parent ee56f33 commit f1c0e66
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions WiiMusicEditorPlus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from getpass import getuser

from PyQt5 import QtCore, QtWidgets
from PyQt5.QtCore import QLocale, QTranslator, QProcess
from PyQt5.QtCore import QLocale, QTranslator
from PyQt5.Qt import QFontDatabase
from PyQt5.QtGui import QColor, QIcon
from PyQt5.QtWidgets import QApplication, QFileDialog, QMainWindow
Expand Down Expand Up @@ -521,10 +521,12 @@ def LoadDolphin(self,menu):
ini.set("Core","EnableCheats","True")
with open(config+"Dolphin.ini","w") as inifile:
ini.write(inifile)
cmd = ['-e',editor.file.path+'/sys/main.dol']
if(not menu): cmd.insert(0,"-b")
dolphin = QProcess()
dolphin.startDetached(editor.dolphinPath,cmd)
cmd = [editor.dolphinPath,'-e',editor.file.path+'/sys/main.dol']
if(currentSystem == "Mac"): cmd[0] += "/Contents/MacOS/Dolphin"
if(not menu): cmd.insert(1,"-b")
env = os.environ
env["QT_QPA_PLATFORM_PLUGIN_PATH"] = os.path.dirname(editor.dolphinPath)+'/QtPlugins/platforms/'
subprocess.Popen(cmd,env=env)
except Exception as e:
ShowError(self.tr("Unable to launch Dolphin"),self.tr("Check the Dolphin path in the settings")+"\n"+str(e))

Expand Down

0 comments on commit f1c0e66

Please sign in to comment.