Modules/input/Usage

From MSX Game Library

Revision as of 23:10, 7 January 2024 by Aoineko (talk | contribs)

< Modules‎ | input

Check joystick bouton example:

u8 joyStat = Joystick_Read(JOY_PORT_1);
if ((joyStat & JOY_INPUT_TRIGGER_A) == 0)
{
	// Joystick A boutton pressed
}
else if ((joyStat & JOY_INPUT_TRIGGER_B) == 0)
{
	// Joystick B boutton pressed
}