1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 23:32:26 +00:00

openbsd xf86 aperture support

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14568 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2005-01-21 21:36:30 +00:00
parent 63d8cbd8bc
commit 09b8a53e16

View File

@ -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 @@ dha_helper_way:
#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");