[MPlayer-cvslog] CVS: main/libdha libdha.c,1.12,1.13
Alex Beregszaszi
syncmail at mplayerhq.hu
Fri Jan 21 22:36:32 CET 2005
CVS change done by Alex Beregszaszi
Update of /cvsroot/mplayer/main/libdha
In directory mail:/var2/tmp/cvs-serv11218
Modified Files:
libdha.c
Log Message:
openbsd xf86 aperture support
Index: libdha.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/libdha.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- libdha.c 26 Mar 2004 12:15:54 -0000 1.12
+++ libdha.c 21 Jan 2005 21:36:30 -0000 1.13
@@ -50,6 +50,10 @@
# endif
# endif /* SVR4 */
+#if defined(__OpenBSD__)
+#define DEV_APERTURE "/dev/xf86"
+#endif
+
/* Generic version */
#include <sys/mman.h>
@@ -117,6 +121,20 @@
#endif
dev_mem_way:
+#ifdef DEV_APERTURE
+ if ((mem_fd = open(DEV_APERTURE, O_RDWR)) == -1)
+ perror("libdha: opening aperture failed");
+ else {
+ void *p = mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,mem_fd,base);
+
+ if (p == MAP_FAILED) {
+ perror("libdha: mapping aperture failed");
+ close(mem_fd);
+ } else
+ return p;
+ }
+#endif
+
if ( (mem_fd = open(DEV_MEM,O_RDWR)) == -1)
{
perror("libdha: opening /dev/mem failed");
More information about the MPlayer-cvslog
mailing list