projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bidouille pour qu'il n'y ait pas de collisions de numéros d'événements.
[minwii.git]
/
src
/
pywiiuse
/
pygame_wiimote.py
diff --git
a/src/pywiiuse/pygame_wiimote.py
b/src/pywiiuse/pygame_wiimote.py
index
5540430
..
26d9f9d
100755
(executable)
--- a/
src/pywiiuse/pygame_wiimote.py
+++ b/
src/pywiiuse/pygame_wiimote.py
@@
-22,6
+22,7
@@
import time
# events to use. Is there a way to get ones known to be unused?
base = pygame.USEREVENT
# events to use. Is there a way to get ones known to be unused?
base = pygame.USEREVENT
+print 'pygame_wiimote base :', pygame.USEREVENT
WIIMOTE_BUTTON_PRESS = base + 1
WIIMOTE_BUTTON_RELEASE = base + 2
WIIMOTE_ACCEL = base + 3
WIIMOTE_BUTTON_PRESS = base + 1
WIIMOTE_BUTTON_RELEASE = base + 2
WIIMOTE_ACCEL = base + 3
@@
-32,6
+33,10
@@
NUNCHUK_ACCEL = base + 7
NUNCHUK_JOY = base + 8
WIIMOTE_STATUS = base + 9
WIIMOTE_DISCONNECT = base + 10
NUNCHUK_JOY = base + 8
WIIMOTE_STATUS = base + 9
WIIMOTE_DISCONNECT = base + 10
+pygame.USEREVENT = WIIMOTE_DISCONNECT
+if pygame.USEREVENT > pygame.NUMEVENTS :
+ pygame.NUMEVENTS = pygame.USEREVENT
+
wiiuse = None # import within the thread, why do I have to do this?
wiiuse = None # import within the thread, why do I have to do this?