Press Multiples Buttons


kouky

Member
Joined
Sep 3, 2006
Messages
185
Location
London
Website
www.caou.org
Hello,
I would like to be able to manage multiple button pressures, but I can't do it so far. I only succesfully managed single button pressures interactivity.
It would be so helpfull if someone could post a simple SDL/c++ code which makes the screen to become green or something when you press A + B gp2x buttons or A + B windows keyboard at the same time.

Cheers!
 
I posted this the other day which should do the job http://www.gp32x.de/board/index.php?s=&am...st&p=473024

for the input checking part the following should work, havent tried it though :)

Code:
// add your pc/gp2x keys here
if ((keysHeld[GP2X_BUTTON_A] && keysHeld[GP2X_BUTTON_B]) || (keysHeld[SDLK_a] && keysHeld[SDLK_b]))
{
	 // do stuff here
}
 
Last edited by a moderator:
Yeah!! that's it !
"if ( SDL_JoystickGetButton( joy, 2 ) )" was what I was looking for weeks !
Thanks you so much, have a nice day !!
 
Back
Top