From 593066bb7c0b655acbf0d89ee2aaf5a601ea68da Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Wed, 9 Apr 2003 21:47:35 +0000 Subject: now uses generic framebuffer device name and checks real_type CVS patchset: 4581 CVS date: 2003/04/09 21:47:35 --- src/video_out/video_out_pgx64.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c index 840359db5..8f056198b 100644 --- a/src/video_out/video_out_pgx64.c +++ b/src/video_out/video_out_pgx64.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_pgx64.c,v 1.25 2003/04/03 21:30:25 komadori Exp $ + * $Id: video_out_pgx64.c,v 1.26 2003/04/09 21:47:35 komadori Exp $ * * video_out_pgx64.c, Sun PGX64/PGX24 output plugin for xine * @@ -693,9 +693,9 @@ static pgx64_driver_t* init_driver(pgx64_driver_class_t *class) class->instance_count++; pthread_mutex_unlock(&class->mutex); - devname = class->config->register_string(class->config, "video.pgx64_device", "/dev/m640", "name of pgx64 device", NULL, 10, NULL, NULL); + devname = class->config->register_string(class->config, "video.pgx64_device", "/dev/fb", "name of pgx64 device", NULL, 10, NULL, NULL); if ((fbfd = open(devname, O_RDWR)) < 0) { - printf("video_out_pgx64: can't open framebuffer device (%s)\n", devname); + printf("video_out_pgx64: can't open framebuffer device '%s'\n", devname); return NULL; } @@ -705,6 +705,12 @@ static pgx64_driver_t* init_driver(pgx64_driver_class_t *class) return NULL; } + if (attr.real_type != 22) { + printf("video_out_pgx64: '%s' is not a mach64 framebuffer device\n", devname); + close(fbfd); + return NULL; + } + if ((baseaddr = mmap(0, ADDRSPACE, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0)) == MAP_FAILED) { printf("video_out_pgx64: unable to memory map framebuffer\n"); close(fbfd); -- cgit v1.2.3