summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin KAY <komadori@users.sourceforge.net>2003-04-09 21:47:35 +0000
committerRobin KAY <komadori@users.sourceforge.net>2003-04-09 21:47:35 +0000
commit593066bb7c0b655acbf0d89ee2aaf5a601ea68da (patch)
tree89fa5366a506a962dc05c5b1f3a7ac4c408d39fd
parent6ed63403e63a53e4de6f8b5b9d4a458fec791d82 (diff)
downloadxine-lib-593066bb7c0b655acbf0d89ee2aaf5a601ea68da.tar.gz
xine-lib-593066bb7c0b655acbf0d89ee2aaf5a601ea68da.tar.bz2
now uses generic framebuffer device name and checks real_type
CVS patchset: 4581 CVS date: 2003/04/09 21:47:35
-rw-r--r--src/video_out/video_out_pgx64.c12
1 files changed, 9 insertions, 3 deletions
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);