src/mess/inputx.c
| r2138 | r2139 | |
| 1394 | 1394 | |
| 1395 | 1395 | |
| 1396 | 1396 | |
| 1397 | | int input_has_input_class(int inputclass) |
| 1397 | int input_has_input_class(running_machine *machine, int inputclass) |
| 1398 | 1398 | { |
| 1399 | 1399 | input_port_entry *in; |
| 1400 | | for (in = Machine->input_ports; in->type != IPT_END; in++) |
| 1400 | for (in = machine->input_ports; in->type != IPT_END; in++) |
| 1401 | 1401 | { |
| 1402 | 1402 | if (input_classify_port(in) == inputclass) |
| 1403 | 1403 | return TRUE; |
| r2138 | r2139 | |
| 1407 | 1407 | |
| 1408 | 1408 | |
| 1409 | 1409 | |
| 1410 | | int input_count_players(void) |
| 1410 | int input_count_players(running_machine *machine) |
| 1411 | 1411 | { |
| 1412 | 1412 | const input_port_entry *in; |
| 1413 | 1413 | int joystick_count; |
| 1414 | 1414 | |
| 1415 | 1415 | joystick_count = 0; |
| 1416 | | for (in = Machine->input_ports; in->type != IPT_END; in++) |
| 1416 | for (in = machine->input_ports; in->type != IPT_END; in++) |
| 1417 | 1417 | { |
| 1418 | 1418 | if (input_classify_port(in) == INPUT_CLASS_CONTROLLER) |
| 1419 | 1419 | { |
| r2138 | r2139 | |
| 1426 | 1426 | |
| 1427 | 1427 | |
| 1428 | 1428 | |
| 1429 | | int input_category_active(int category) |
| 1429 | int input_category_active(running_machine *machine, int category) |
| 1430 | 1430 | { |
| 1431 | 1431 | const input_port_entry *in; |
| 1432 | 1432 | const input_port_entry *in_base = NULL; |
| 1433 | 1433 | |
| 1434 | 1434 | assert(category >= 1); |
| 1435 | 1435 | |
| 1436 | | for (in = Machine->input_ports; in->type != IPT_END; in++) |
| 1436 | for (in = machine->input_ports; in->type != IPT_END; in++) |
| 1437 | 1437 | { |
| 1438 | 1438 | switch(in->type) { |
| 1439 | 1439 | case IPT_CATEGORY_NAME: |
src/mess/inputx.h
| r2138 | r2139 | |
| 101 | 101 | |
| 102 | 102 | /* miscellaneous functions */ |
| 103 | 103 | int input_classify_port(const input_port_entry *in); |
| 104 | | int input_has_input_class(int inputclass); |
| 104 | int input_has_input_class(running_machine *machine, int inputclass); |
| 105 | 105 | int input_player_number(const input_port_entry *in); |
| 106 | | int input_count_players(void); |
| 107 | | int input_category_active(int category); |
| 106 | int input_count_players(running_machine *machine); |
| 107 | int input_category_active(running_machine *machine, int category); |
| 108 | 108 | |
| 109 | 109 | #endif /* INPUTX_H */ |
src/mess/osd/windows/menu.c
| r2138 | r2139 | |
| 1149 | 1149 | { |
| 1150 | 1150 | // set up joystick menu |
| 1151 | 1151 | #ifndef UNDER_CE |
| 1152 | | joystick_count = input_count_players(); |
| 1152 | joystick_count = input_count_players(machine); |
| 1153 | 1153 | #endif |
| 1154 | 1154 | if (joystick_count > 0) |
| 1155 | 1155 | { |
| r2138 | r2139 | |
| 1246 | 1246 | |
| 1247 | 1247 | speed = video_get_throttle() ? video_get_speed_factor() : 0; |
| 1248 | 1248 | |
| 1249 | | has_config = input_has_input_class(INPUT_CLASS_CONFIG); |
| 1250 | | has_dipswitch = input_has_input_class(INPUT_CLASS_DIPSWITCH); |
| 1251 | | has_keyboard = input_has_input_class(INPUT_CLASS_KEYBOARD); |
| 1252 | | has_misc = input_has_input_class(INPUT_CLASS_MISC); |
| 1249 | has_config = input_has_input_class(machine, INPUT_CLASS_CONFIG); |
| 1250 | has_dipswitch = input_has_input_class(machine, INPUT_CLASS_DIPSWITCH); |
| 1251 | has_keyboard = input_has_input_class(machine, INPUT_CLASS_KEYBOARD); |
| 1252 | has_misc = input_has_input_class(machine, INPUT_CLASS_MISC); |
| 1253 | 1253 | |
| 1254 | 1254 | has_analog = 0; |
| 1255 | 1255 | for (in = machine->input_ports; in->type != IPT_END; in++) |