From 5399d52215c232a9ca27d2bc01cb4a75ec668649 Mon Sep 17 00:00:00 2001 From: pin Date: Mon, 11 Jul 2011 13:46:58 +0000 Subject: [PATCH] =?utf8?q?Sous=20windows,=20la=20d=C3=A9sactivation=20du?= =?utf8?q?=20tracking=20infrarouge=20des=20wiimotes=20inactives=20ralenti?= =?utf8?q?=20grave=20le=20bouzin=20!=20On=20le=20laisse=20donc.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@369 fe552daf-6dbe-4428-90eb-1537e0879342 --- src/pywiiuse/pygame_wiimouse.py | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/pywiiuse/pygame_wiimouse.py b/src/pywiiuse/pygame_wiimouse.py index 013d91b..b8b4c99 100755 --- a/src/pywiiuse/pygame_wiimouse.py +++ b/src/pywiiuse/pygame_wiimouse.py @@ -88,23 +88,23 @@ class wiimote_thread(Thread): def selectWiimote(self, wiimoteIndex) : self.selectedWiimoteIndex = wiimoteIndex - for i in range(self.actual_nmotes) : - wm = self.wiimotes[i] - if i == wiimoteIndex : - self.do(wiiuse.set_ir, wm, 1) - self.do(wiiuse.set_ir_vres, wm, *self.screenResolution) - if self.position == 'ABOVE' : - position = wiiuse.IR_ABOVE - elif self.position == 'BELOW' : - position = wiiuse.IR_BELOW - else : - position = wiiuse.IR_ABOVE - self.do(wiiuse.set_ir_position, wm, position) - # TODO aspect ratio - #self.do(wiiuse.set_aspect_ratio, wm, aspect) - - else : - self.do(wiiuse.set_ir, wm, 0) +# for i in range(self.actual_nmotes) : +# wm = self.wiimotes[i] +# if i == wiimoteIndex : +# self.do(wiiuse.set_ir, wm, 1) +# self.do(wiiuse.set_ir_vres, wm, *self.screenResolution) +# if self.position == 'ABOVE' : +# position = wiiuse.IR_ABOVE +# elif self.position == 'BELOW' : +# position = wiiuse.IR_BELOW +# else : +# position = wiiuse.IR_ABOVE +# self.do(wiiuse.set_ir_position, wm, position) +# # TODO aspect ratio +# #self.do(wiiuse.set_aspect_ratio, wm, aspect) +# +# else : +# self.do(wiiuse.set_ir, wm, 0) def do(self, func, *args): '''Run the function in the thread handling the wiimote''' @@ -217,7 +217,7 @@ def init(nmotes, timeout, screenResolution=(660, 370), position='ABOVE'): for i in range(nmotes) : wm = Wiimote(i) # access the wiimote object wm.enable_accels(0) # turn off acceleration reporting - #wm.enable_ir(1, vres = screenResolution, position=position) + wm.enable_ir(1, vres = screenResolution, position=position) def get_count(): -- 2.20.1