aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authornakai <nakai@FreeBSD.org>2001-01-22 08:56:20 +0800
committernakai <nakai@FreeBSD.org>2001-01-22 08:56:20 +0800
commit810113f4c4cd84e881d055366bc9bc1c591e36fb (patch)
treebda5bee808a57f671b90fb09ad9bc05124e5f0ea /emulators
parent3f3c10384aab52c6573bb450e6e94433dd1f2770 (diff)
downloadfreebsd-ports-gnome-810113f4c4cd84e881d055366bc9bc1c591e36fb.tar.gz
freebsd-ports-gnome-810113f4c4cd84e881d055366bc9bc1c591e36fb.tar.zst
freebsd-ports-gnome-810113f4c4cd84e881d055366bc9bc1c591e36fb.zip
Add fix for 4.2-stable.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/snes9x/Makefile1
-rw-r--r--emulators/snes9x/files/patch-af74
2 files changed, 42 insertions, 33 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile
index 5be0d3be7f76..34c04e1dfb87 100644
--- a/emulators/snes9x/Makefile
+++ b/emulators/snes9x/Makefile
@@ -7,6 +7,7 @@
PORTNAME= snes9x
PORTVERSION= 1.34a
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://www.snes9x.com/zips/
DISTNAME= s9xs134a
diff --git a/emulators/snes9x/files/patch-af b/emulators/snes9x/files/patch-af
index d2b26c71c49f..72ab586dd458 100644
--- a/emulators/snes9x/files/patch-af
+++ b/emulators/snes9x/files/patch-af
@@ -1,6 +1,6 @@
---- unix/unix.cpp.orig Fri Oct 6 17:02:40 2000
-+++ unix/unix.cpp Sun Dec 10 12:39:28 2000
-@@ -49,9 +49,11 @@
+--- unix/unix.cpp.orig Wed Jan 10 06:40:14 2001
++++ unix/unix.cpp Mon Jan 22 00:17:21 2001
+@@ -51,9 +51,11 @@
#include <ctype.h>
@@ -13,7 +13,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-@@ -66,8 +68,12 @@
+@@ -68,8 +70,12 @@
pthread_mutex_t mutex;
#endif
@@ -26,7 +26,7 @@
#include <sys/mman.h>
#endif
-@@ -83,6 +89,11 @@
+@@ -85,6 +91,11 @@
typedef void (*SIG_PF)();
#endif
@@ -38,7 +38,7 @@
#include "snes9x.h"
#include "memmap.h"
#include "debug.h"
-@@ -109,7 +120,10 @@
+@@ -111,7 +122,10 @@
int NumControllers = 5;
#ifdef JOYSTICK_SUPPORT
@@ -49,7 +49,7 @@
#include <linux/joystick.h>
int js_fd [4] = {-1, -1, -1, -1};
int js_map_button [4][16] = {
-@@ -156,6 +170,63 @@
+@@ -158,6 +172,63 @@
char *js_device [4] = {"/dev/js0", "/dev/js1", "/dev/js2", "/dev/js3"};
#endif
@@ -113,7 +113,7 @@
void InitJoysticks ();
void ReadJoysticks ();
#endif
-@@ -167,7 +238,7 @@
+@@ -169,7 +240,7 @@
char *rom_filename = NULL;
char *snapshot_filename = NULL;
@@ -122,7 +122,7 @@
static void sigbrkhandler(int)
{
#ifdef DEBUGGER
-@@ -194,91 +265,43 @@
+@@ -196,91 +267,43 @@
if (strcmp (argv [i], "-j") == 0 ||
strcasecmp (argv [i], "-nojoy") == 0)
Settings.JoystickEnabled = FALSE;
@@ -130,23 +130,9 @@
- {
- if (i + 1 < argc)
- js_device[0] = argv[++i];
-+#ifdef __FreeBSD__
-+ else if (strcasecmp(argv[i], "-joyshift") == 0)
-+ JoystickShift = 1;
-+#endif
-+ else if (strncasecmp(argv[i], "-joydev", sizeof("-joydev") - 1) == 0) {
-+ char *end, *snum = argv[i] + sizeof("-joydev") - 1;
-+ unsigned long num;
-+
-+ if (*snum == '\0' || argc < i + 1)
-+ S9xUsage();
-+ if ((num = strtoul(snum, &end, 10)) < JOYSTICK_MAX_DEVICES &&
-+ num > 0 && *end == '\0')
-+ js_device[num - 1] = argv[++i];
- else
+- else
- S9xUsage ();
-+ S9xUsage();
- }
+- }
- else if (strcasecmp (argv [i], "-joydev2") == 0)
- {
- if (i + 1 < argc)
@@ -169,9 +155,23 @@
- if ((t = atoi (argv [++i])) < 15) js_map_button [0][t] = SNES_START_MASK;
- if ((t = atoi (argv [++i])) < 15) js_map_button [0][t] = SNES_SELECT_MASK;
- }
-- else
++#ifdef __FreeBSD__
++ else if (strcasecmp(argv[i], "-joyshift") == 0)
++ JoystickShift = 1;
++#endif
++ else if (strncasecmp(argv[i], "-joydev", sizeof("-joydev") - 1) == 0) {
++ char *end, *snum = argv[i] + sizeof("-joydev") - 1;
++ unsigned long num;
++
++ if (*snum == '\0' || argc < i + 1)
++ S9xUsage();
++ if ((num = strtoul(snum, &end, 10)) < JOYSTICK_MAX_DEVICES &&
++ num > 0 && *end == '\0')
++ js_device[num - 1] = argv[++i];
+ else
- S9xUsage ();
-- }
++ S9xUsage();
+ }
- else if (strcasecmp (argv [i], "-joymap2") == 0)
- {
- if (i + 8 < argc)
@@ -249,7 +249,7 @@
}
else
#endif
-@@ -415,7 +438,7 @@
+@@ -419,7 +442,7 @@
#if !defined(__MSDOS) && defined(DEBUGGER)
#if defined(__unix) && !defined(__NeXT__)
struct sigaction sa;
@@ -258,7 +258,7 @@
sa.sa_handler = sigbrkhandler;
#else
sa.sa_handler = (SIG_PF) sigbrkhandler;
-@@ -618,6 +641,7 @@
+@@ -611,6 +634,7 @@
}
#ifdef JOYSTICK_SUPPORT
@@ -266,7 +266,7 @@
void InitJoysticks ()
{
#ifdef JSIOCGVERSION
-@@ -738,6 +762,180 @@
+@@ -731,6 +755,188 @@
}
#endif
}
@@ -290,6 +290,9 @@
+ struct hid_item h, new_h;
+ struct js_info *my_info;
+ int reportlen, report_id, is_joystick;
++#if __FreeBSD__ <= 4
++ int* hid_input_ptr;
++#endif
+
+ my_info = &js_info[js_count];
+ rd = hid_get_report_desc(fd);
@@ -298,7 +301,12 @@
+ return (-1);
+ }
+ report_id = 0;
++#if __FreeBSD__ >= 5
+ reportlen = hid_report_size(rd, report_id, hid_input);
++#else
++ *hid_input_ptr = hid_input;
++ reportlen = hid_report_size(rd, report_id, hid_input_ptr);
++#endif
+ my_info->buf = (char *)malloc(reportlen);
+ if (my_info->buf == NULL)
+ err(1, "malloc");
@@ -447,7 +455,7 @@
#endif // defined (JOYSTICK_SUPPORT)
const char *GetHomeDirectory ()
-@@ -1427,7 +1625,7 @@
+@@ -1423,7 +1629,7 @@
}
#endif
@@ -456,7 +464,7 @@
static int Rates[8] =
{
0, 8192, 11025, 16500, 22050, 29300, 36600, 44000
-@@ -1546,7 +1744,7 @@
+@@ -1542,7 +1748,7 @@
}
#endif
@@ -465,7 +473,7 @@
void S9xUnixProcessSound (void)
{
}
-@@ -1645,7 +1843,7 @@
+@@ -1641,7 +1847,7 @@
void *S9xProcessSound (void *)
{