X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/e1080bdabe912ce17137a79988b04ff85c00cc03..899a6365838f7a7c1427676277ef72c934c1d1bb:/src/app/start.py diff --git a/src/app/start.py b/src/app/start.py index 9cfbd40..3f5f247 100755 --- a/src/app/start.py +++ b/src/app/start.py @@ -8,15 +8,17 @@ $URL$ """ -def main() : + +def main(wiimoteSupport) : import pygame from minwii import MinWii pygame.init() - modeResolution = (1024,768) + #modeResolution = (1024,768) #modeResolution = (600,480) - window = pygame.display.set_mode(modeResolution)#, pygame.FULLSCREEN) - MinWii() + #pygame.display.set_mode(modeResolution, pygame.NOFRAME)#, pygame.FULLSCREEN) + minwii = MinWii(wiimoteSupport=wiimoteSupport) + minwii.run() # from gui.PGUConfiguration import PGUConfiguration # pygame.init() # modeResolution = (1024,768) @@ -27,9 +29,22 @@ def main() : if __name__ == "__main__" : from os.path import realpath, sep import sys + from optparse import OptionParser + + usage = "%prog instance_home products_conf_file [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