summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation/sdlmame/files/0.120a/dipports.patch')
-rw-r--r--games-emulation/sdlmame/files/0.120a/dipports.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/games-emulation/sdlmame/files/0.120a/dipports.patch b/games-emulation/sdlmame/files/0.120a/dipports.patch
new file mode 100644
index 000000000..c0c871380
--- /dev/null
+++ b/games-emulation/sdlmame/files/0.120a/dipports.patch
@@ -0,0 +1,38 @@
+diff -Nru base0113s/src/emu/info.c w0113/src/emu/info.c
+--- base0113s/src/emu/info.c 2007-02-12 16:43:00.000000000 +1300
++++ w0113/src/emu/info.c 2007-03-06 10:40:09.000000000 +1300
+@@ -36,6 +36,7 @@
+ static void print_game_switch(FILE* out, const game_driver* game)
+ {
+ const input_port_entry* input;
++ int port = -1;
+
+ begin_resource_tracking();
+
+@@ -43,6 +44,9 @@
+
+ while (input->type != IPT_END)
+ {
++ if(input->start.tag != NULL)
++ port++;
++
+ if (input->type==IPT_DIPSWITCH_NAME)
+ {
+ int def = input->default_value;
+@@ -50,6 +54,8 @@
+ fprintf(out, "\t\t<dipswitch");
+
+ fprintf(out, " name=\"%s\"", xml_normalize_string(input->name));
++ fprintf(out, " mask=\"%i\"", input->mask);
++ fprintf(out, " port=\"%i\"", port);
+ ++input;
+
+ fprintf(out, ">\n");
+@@ -58,6 +64,7 @@
+ {
+ fprintf(out, "\t\t\t<dipvalue");
+ fprintf(out, " name=\"%s\"", xml_normalize_string(input->name));
++ fprintf(out, " value=\"%i\"", input->default_value);
+ if (def == input->default_value)
+ fprintf(out, " default=\"yes\"");
+