X-Git-Url: https://scm.cri.minesparis.psl.eu/git/minwii.git/blobdiff_plain/a72de39dce597f55d5c63f51825427605314cd72..da27397af045e89d82771d70851ec7cc9d158f70:/src/app/start.py

diff --git a/src/app/start.py b/src/app/start.py
index d25e0a7..dd0b0d5 100755
--- a/src/app/start.py
+++ b/src/app/start.py
@@ -8,28 +8,34 @@ $URL$
 """
 
 
-def main() :
+
+def main(wiimoteSupport) :
     import pygame
     from minwii import MinWii
-    
     pygame.init()
-    #modeResolution = (1024,768)
-    modeResolution = (600,480)
-    window = pygame.display.set_mode(modeResolution)#, pygame.FULLSCREEN)
-    MinWii()
-    # from gui.PGUConfiguration import PGUConfiguration
-    # pygame.init()
-    # modeResolution = (1024,768)
-    # window = pygame.display.set_mode(modeResolution)#,pygame.FULLSCREEN)
-    # pgu = PGUConfiguration(window)
+    minwii = MinWii(wiimoteSupport=wiimoteSupport)
+    minwii.run()
     pygame.quit()   
 
 if __name__ == "__main__" :
     from os.path import realpath, sep
     import sys
+    from optparse import OptionParser
+    
+    usage = "%prog [options]"
+    op = OptionParser(usage)
+    
+    op.add_option("--no-wii", dest="wiimoteSupport"
+                        , action="store_false"
+                        , default=True
+                        , help = u"désactivation du support des wiimotes"
+                                 u" [%default]")
+    
+    options, args = op.parse_args()
+    wiimoteSupport = options.wiimoteSupport
 
     minwiipath = realpath(__file__).split(sep)
     minwiipath = minwiipath[:-2]
     minwiipath = sep.join(minwiipath)
     sys.path.insert(1, minwiipath)
-    main()
\ No newline at end of file
+    main(wiimoteSupport)
\ No newline at end of file