]> Pileus Git - ~andy/sunrise/blob - games-emulation/sdlmame/files/0.120a/dipports.patch
games-emulation/sdlmame: Removed version information from patches names.
[~andy/sunrise] / games-emulation / sdlmame / files / 0.120a / dipports.patch
1 diff -Nru base0113s/src/emu/info.c w0113/src/emu/info.c
2 --- base0113s/src/emu/info.c    2007-02-12 16:43:00.000000000 +1300
3 +++ w0113/src/emu/info.c        2007-03-06 10:40:09.000000000 +1300
4 @@ -36,6 +36,7 @@
5  static void print_game_switch(FILE* out, const game_driver* game)
6  {
7         const input_port_entry* input;
8 +       int port = -1;
9  
10         begin_resource_tracking();
11  
12 @@ -43,6 +44,9 @@
13  
14         while (input->type != IPT_END)
15         {
16 +               if(input->start.tag != NULL)
17 +                       port++;
18 +
19                 if (input->type==IPT_DIPSWITCH_NAME)
20                 {
21                         int def = input->default_value;
22 @@ -50,6 +54,8 @@
23                         fprintf(out, "\t\t<dipswitch");
24  
25                         fprintf(out, " name=\"%s\"", xml_normalize_string(input->name));
26 +                       fprintf(out, " mask=\"%i\"", input->mask);
27 +                       fprintf(out, " port=\"%i\"", port);
28                         ++input;
29  
30                         fprintf(out, ">\n");
31 @@ -58,6 +64,7 @@
32                         {
33                                 fprintf(out, "\t\t\t<dipvalue");
34                                 fprintf(out, " name=\"%s\"", xml_normalize_string(input->name));
35 +                               fprintf(out, " value=\"%i\"", input->default_value);
36                                 if (def == input->default_value)
37                                         fprintf(out, " default=\"yes\"");
38