set mac resources path on options update cancel

This commit is contained in:
Headshotnoby 2021-06-25 11:16:03 -04:00
parent 68856f9ecb
commit 993bab019d

View File

@ -2,6 +2,9 @@ from ConfigParser import ConfigParser
from os.path import exists from os.path import exists
from os import listdir, _exit from os import listdir, _exit
import subprocess import subprocess
try:
import Cocoa # mac
except: pass
from PyQt4 import QtGui, QtCore from PyQt4 import QtGui, QtCore
@ -263,6 +266,8 @@ class Settings(QtGui.QDialog):
if code == 0: if code == 0:
subprocess.Popen(["./AO2XPupdat"]) subprocess.Popen(["./AO2XPupdat"])
_exit(0) _exit(0)
elif osname == "Darwin": # bundle
os.chdir(Cocoa.NSBundle.mainBundle().resourcePath()) # return to Resources folder
def onReloadAudio(self): def onReloadAudio(self):
audio.free() audio.free()