Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug in SDL::Event::key_mod, it returned pointer instead of int

  • Loading branch information...
commit 8df58a6979293e68d5bde6c80f88637e996e5090 1 parent 60fe02c
Tobias Leich authored
Showing with 4 additions and 4 deletions.
  1. +1 −0  CHANGELOG
  2. +3 −4 src/Core/objects/Event.xs
View
1  CHANGELOG
@@ -4,6 +4,7 @@ Revision history for Perl extension SDL_perl.
- Finished a working version of SDLx::Sprite::Animated [jtpalmer]
- Added draw functions to SDLx::Sprite
- Cleanedup Sprite inheritance from Surface
+ - Fixed bug in SDL::Event::key_mod, it returned pointer instead of int [FROGGS]
* 2.502
- Displaying Alien::SDL's build option for every build step [FROGGS]
View
7 src/Core/objects/Event.xs
@@ -217,7 +217,7 @@ event_key_sym ( event, ... )
OUTPUT:
RETVAL
-SDLMod *
+Uint16
event_key_mod ( event, ... )
SDL_Event *event
CODE:
@@ -226,11 +226,10 @@ event_key_mod ( event, ... )
if( items > 1 )
{
- SDLMod *mp = (SDLMod * )SvPV( ST(1), PL_na) ;
- b->mod = *mp;
+ b->mod = SvIV( ST(1) );
}
- RETVAL = &(b->mod);
+ RETVAL = b->mod;
OUTPUT:
RETVAL
Please sign in to comment.
Something went wrong with that request. Please try again.