Support for making Joystick processing optional

This commit is contained in:
Parakoopa 2020-06-20 22:11:50 +02:00
parent 3d198fcb9b
commit 6be61e4a42
2 changed files with 10 additions and 8 deletions

View File

@ -136,16 +136,18 @@ EXPORTED void desmume_skip_next_frame()
NDS_SkipNextFrame();
}
EXPORTED void desmume_cycle()
EXPORTED void desmume_cycle(BOOL with_joystick)
{
u16 keypad;
/* Joystick events */
/* Retrieve old value: can use joysticks w/ another device (from our side) */
keypad = get_keypad();
/* Process joystick events if any */
process_joystick_events(&keypad);
/* Update keypad value */
update_keypad(keypad);
if (with_joystick) {
/* Retrieve old value: can use joysticks w/ another device (from our side) */
keypad = get_keypad();
/* Process joystick events if any */
process_joystick_events(&keypad);
/* Update keypad value */
update_keypad(keypad);
}
NDS_beginProcessingInput();
{

View File

@ -80,7 +80,7 @@ EXPORTED void desmume_reset(void);
EXPORTED void desmume_stop(void);
EXPORTED BOOL desmume_running(void);
EXPORTED void desmume_skip_next_frame(void);
EXPORTED void desmume_cycle(void);
EXPORTED void desmume_cycle(BOOL with_joystick);
EXPORTED int desmume_sdl_get_ticks();