Previous 15994 Revisions Next

r2139 Saturday 29th March, 2008 at 14:22:54 UTC by Firewave
Yet another Machine -> machine cleanup
[src/emu]uimenu.c
[src/mess]inputx.c inputx.h
[src/mess/osd/windows]menu.c

src/emu/uimenu.c
r2138r2139
18891889      /* add if we match the group and we have a valid name */
18901890      if ((name != NULL) && (input_port_condition(in)) &&
18911891#ifdef MESS
1892         (in->category == 0 || input_category_active(in->category)) &&
1892         (in->category == 0 || input_category_active(Machine, in->category)) &&
18931893#endif /* MESS */
18941894         ((in->type == IPT_OTHER && in->name != IP_NAME_DEFAULT) || port_type_to_group(in->type, in->player) != IPG_INVALID))
18951895      {
src/mess/inputx.c
r2138r2139
13941394
13951395
13961396
1397int input_has_input_class(int inputclass)
1397int input_has_input_class(running_machine *machine, int inputclass)
13981398{
13991399   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++)
14011401   {
14021402      if (input_classify_port(in) == inputclass)
14031403         return TRUE;
r2138r2139
14071407
14081408
14091409
1410int input_count_players(void)
1410int input_count_players(running_machine *machine)
14111411{
14121412   const input_port_entry *in;
14131413   int joystick_count;
14141414
14151415   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++)
14171417   {
14181418      if (input_classify_port(in) == INPUT_CLASS_CONTROLLER)
14191419      {
r2138r2139
14261426
14271427
14281428
1429int input_category_active(int category)
1429int input_category_active(running_machine *machine, int category)
14301430{
14311431   const input_port_entry *in;
14321432   const input_port_entry *in_base = NULL;
14331433
14341434   assert(category >= 1);
14351435
1436   for (in = Machine->input_ports; in->type != IPT_END; in++)
1436   for (in = machine->input_ports; in->type != IPT_END; in++)
14371437   {
14381438      switch(in->type) {
14391439      case IPT_CATEGORY_NAME:
src/mess/inputx.h
r2138r2139
101101
102102/* miscellaneous functions */
103103int input_classify_port(const input_port_entry *in);
104int input_has_input_class(int inputclass);
104int input_has_input_class(running_machine *machine, int inputclass);
105105int input_player_number(const input_port_entry *in);
106int input_count_players(void);
107int input_category_active(int category);
106int input_count_players(running_machine *machine);
107int input_category_active(running_machine *machine, int category);
108108
109109#endif /* INPUTX_H */
src/mess/osd/windows/menu.c
r2138r2139
11491149   {
11501150      // set up joystick menu
11511151#ifndef UNDER_CE
1152      joystick_count = input_count_players();
1152      joystick_count = input_count_players(machine);
11531153#endif
11541154      if (joystick_count > 0)
11551155      {
r2138r2139
12461246
12471247   speed = video_get_throttle() ? video_get_speed_factor() : 0;
12481248
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);
12531253
12541254   has_analog = 0;
12551255   for (in = machine->input_ports; in->type != IPT_END; in++)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team