aboutsummaryrefslogtreecommitdiff
path: root/emulators/higan
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-07-28 19:14:36 +0000
committerJohn Marino <marino@FreeBSD.org>2014-07-28 19:14:36 +0000
commit6ef2bc3db1a168c8504c15a9b0a0b2f2d9bd008d (patch)
tree1f0a6a65805582cc7facbf0b197c2622f1791ee5 /emulators/higan
parent47d1ac1695680f95bb443f3afc0121c9db6c4791 (diff)
downloadports-6ef2bc3db1a168c8504c15a9b0a0b2f2d9bd008d.tar.gz
ports-6ef2bc3db1a168c8504c15a9b0a0b2f2d9bd008d.zip
emulators/higan: Fix GLX support
PR: 190308 Reported by: aksyom (gmail) Fixed by: maintainer (Naram Qashat)
Notes
Notes: svn path=/head/; revision=363232
Diffstat (limited to 'emulators/higan')
-rw-r--r--emulators/higan/Makefile2
-rw-r--r--emulators/higan/files/patch-ruby__video__glx.cpp31
2 files changed, 32 insertions, 1 deletions
diff --git a/emulators/higan/Makefile b/emulators/higan/Makefile
index fd8faf60c938..48adf7c0193f 100644
--- a/emulators/higan/Makefile
+++ b/emulators/higan/Makefile
@@ -3,7 +3,7 @@
PORTNAME= higan
PORTVERSION= 0.94
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= http://byuu.org/files/ \
http://www.cyberbotx.com/higan/
diff --git a/emulators/higan/files/patch-ruby__video__glx.cpp b/emulators/higan/files/patch-ruby__video__glx.cpp
new file mode 100644
index 000000000000..a45d0151a80f
--- /dev/null
+++ b/emulators/higan/files/patch-ruby__video__glx.cpp
@@ -0,0 +1,31 @@
+--- ./ruby/video/glx.cpp.orig 2014-01-20 01:37:14.000000000 -0500
++++ ./ruby/video/glx.cpp 2014-06-02 23:32:39.000000000 -0400
+@@ -128,6 +128,28 @@
+ //require GLX 1.2+ API
+ if(glx.version_major < 1 || (glx.version_major == 1 && glx.version_minor < 2)) return false;
+
++ int major, minor;
++ const char *version = (const char *) glGetString (GL_VERSION);
++ const char *dot = version == NULL ? NULL : strchr (version, '.');
++ const char *major_start = dot;
++
++ /* Sanity check */
++ if (dot == NULL || dot == version || *(dot + 1) == '\0') {
++ major = 0;
++ minor = 0;
++ } else {
++ /* Find the start of the major version in the string */
++ while (major_start > version && *major_start != ' ')
++ --major_start;
++ major = strtol (major_start, NULL, 10);
++ minor = strtol (dot + 1, NULL, 0);
++ }
++
++ if(major < 3 || (major == 3 && minor < 2)) {
++ printf("Error: OpenGL 3.2 is not available. Select another video driver on the Advanced Configuration tab and restart higan.\n");
++ return false;
++ }
++
+ XWindowAttributes window_attributes;
+ XGetWindowAttributes(display, settings.handle, &window_attributes);
+