X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/9a095bdfaa7693d2884da40bb43ea05271f45ebc..27f5c5b477613baebb83d3af27d57f8ee506a585:/src/pywiiuse/pygame_wiimouse.py diff --git a/src/pywiiuse/pygame_wiimouse.py b/src/pywiiuse/pygame_wiimouse.py index b8b4c99..d26ce12 100755 --- a/src/pywiiuse/pygame_wiimouse.py +++ b/src/pywiiuse/pygame_wiimouse.py @@ -88,23 +88,6 @@ 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) def do(self, func, *args): '''Run the function in the thread handling the wiimote''' @@ -127,9 +110,10 @@ class wiimote_thread(Thread): def quit(self): '''Go away.''' - for i in range(self.nmotes): - wiiuse.set_leds(self.wiimotes[i], 0) - wiiuse.disconnect(self.wiimotes[i]) + # TODO will crash if self.nmotes > 4 + # for i in range(self.nmotes): + # wiiuse.set_leds(self.wiimotes[i], 0) + # wiiuse.disconnect(self.wiimotes[i]) self.go = False def get_count(self):