projects
/
sdlgit/SDL_perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
51aadf3
)
Events which can have multiple types should get and set type
Kartik Thakore [Sun, 8 Nov 2009 16:07:31 +0000 (11:07 -0500)]
src/Core/objects/KeyboardEvent.xs
patch
|
blob
|
blame
|
history
src/Core/objects/MouseButtonEvent.xs
patch
|
blob
|
blame
|
history
diff --git
a/src/Core/objects/KeyboardEvent.xs
b/src/Core/objects/KeyboardEvent.xs
index
2889808
..
6d3e11d
100644
(file)
--- a/
src/Core/objects/KeyboardEvent.xs
+++ b/
src/Core/objects/KeyboardEvent.xs
@@
-36,6
+36,12
@@
Uint8
kbevent_type ( event, ... )
SDL_KeyboardEvent *event
CODE:
+ if( items > 1 )
+ {
+ event->type = SvIV( ST(1) );
+
+ }
+
RETVAL = event->type;
OUTPUT:
RETVAL
diff --git
a/src/Core/objects/MouseButtonEvent.xs
b/src/Core/objects/MouseButtonEvent.xs
index
724c144
..
a8b38d0
100644
(file)
--- a/
src/Core/objects/MouseButtonEvent.xs
+++ b/
src/Core/objects/MouseButtonEvent.xs
@@
-38,6
+38,12
@@
Uint8
mbevent_type ( event, ... )
SDL_MouseButtonEvent *event
CODE:
+ if( items > 1 )
+ {
+ event->type = SvIV( ST(1) );
+
+ }
+
RETVAL = event->type;
OUTPUT:
RETVAL