584
584
void input_init(running_machine *machine);
586
586
/* enable or disable a device class */
587
void input_device_class_enable(input_device_class devclass, UINT8 enable);
587
void input_device_class_enable(running_machine *machine, input_device_class devclass, UINT8 enable);
589
589
/* is a device class enabled? */
590
UINT8 input_device_class_enabled(input_device_class devclass);
590
UINT8 input_device_class_enabled(running_machine *machine, input_device_class devclass);
592
592
/* configure default joystick maps */
593
int input_device_set_joystick_map(int devindex, const char *mapstring);
593
int input_device_set_joystick_map(running_machine *machine, int devindex, const char *mapstring);
596
596
/* ----- OSD configuration and access ----- */
606
606
/* ----- state queries ----- */
608
608
/* return the value of a particular input code */
609
INT32 input_code_value(input_code code);
609
INT32 input_code_value(running_machine *machine, input_code code);
611
611
/* return TRUE if the given input code has been pressed */
612
INT32 input_code_pressed(input_code code);
612
INT32 input_code_pressed(running_machine *machine, input_code code);
614
614
/* same as above, but returns TRUE only on the first call after an off->on transition */
615
INT32 input_code_pressed_once(input_code code);
615
INT32 input_code_pressed_once(running_machine *machine, input_code code);
617
617
/* translates an input_item_id to an input_code */
618
input_code input_code_from_input_item_id(input_item_id itemid);
618
input_code input_code_from_input_item_id(running_machine *machine, input_item_id itemid);
620
620
/* poll for any switch input, optionally resetting internal memory */
621
input_code input_code_poll_switches(int reset);
621
input_code input_code_poll_switches(running_machine *machine, int reset);
623
623
/* poll for any keyboard switch input, optionally resetting internal memory */
624
input_code input_code_poll_keyboard_switches(int reset);
624
input_code input_code_poll_keyboard_switches(running_machine *machine, int reset);
626
626
/* poll for any axis input, optionally resetting internal memory */
627
input_code input_code_poll_axes(int reset);
627
input_code input_code_poll_axes(running_machine *machine, int reset);
631
631
/* ----- strings and tokenization ----- */
633
633
/* generate the friendly name of an input code, returning the length (buffer can be NULL) */
634
astring *input_code_name(astring *buffer, input_code code);
634
astring *input_code_name(running_machine *machine, astring *buffer, input_code code);
636
636
/* convert an input code to a token, returning the length (buffer can be NULL) */
637
astring *input_code_to_token(astring *buffer, input_code code);
637
astring *input_code_to_token(running_machine *machine, astring *buffer, input_code code);
639
639
/* convert a token back to an input code */
640
input_code input_code_from_token(const char *_token);
640
input_code input_code_from_token(running_machine *machine, const char *_token);
644
/* ----- debugging utilities ----- */
646
/* return TRUE if the given input code has been pressed */
647
INT32 debug_global_input_code_pressed(input_code code);
643
650
#endif /* __INPUT_H__ */