X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/f5301e6f8629f30e872e20133844975404691a99..29dfa14e4419fb6ceb9350223f410e967e8cc4f6:/src/minwii/app.py

diff --git a/src/minwii/app.py b/src/minwii/app.py
index 444aafc..b9219ae 100755
--- a/src/minwii/app.py
+++ b/src/minwii/app.py
@@ -34,16 +34,15 @@ SCREEN_PLAY         = 2
 
 class MinWii(object):
     
-    def __init__(self, wiimoteSupport=True, fullscreen=False) :
+    def __init__(self, wiimoteSupport=True, fullscreen=False, audioDriver=None) :
         envLogger.info('winwii log format version : %s', LOG_FORMAT_VERSION)
         self.wiimoteSupport = wiimoteSupport
         self.fullscreen = fullscreen
         LaunchScreen()
-        themedir = __file__.split(os.path.sep)[:-1] + ['widgets', 'data', 'minwii_theme']
-        themedir = os.path.sep.join(themedir)
+        themedir = os.path.join(os.path.dirname(__file__), 'widgets', 'data', 'minwii_theme')
         theme = Theme(themedir)
         self.app = Desktop(theme=theme)
-        self.synth = Synth()
+        self.synth = Synth(driver=audioDriver)
         self.screenResolution = SCREEN_RESOLUTION
         envLogger.info('résolution écran : %s', self.screenResolution)
         self.nwiimotes = 0