Support for making Joystick processing optional
This commit is contained in:
parent
3d198fcb9b
commit
6be61e4a42
|
@ -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();
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue