diff src/video/ps3/SDL_ps3video.c @ 3152:7f3341cccf42 gsoc2009_ps3

Working 1080p, 720p, 480p videomodes and double buffering.
author Martin Lowinski <martin@goldtopf.org>
date Thu, 06 Aug 2009 12:24:47 +0000
parents 4a88137385f9
children cce01ba54174
line wrap: on
line diff
--- a/src/video/ps3/SDL_ps3video.c	Tue Jul 21 05:33:11 2009 +0000
+++ b/src/video/ps3/SDL_ps3video.c	Thu Aug 06 12:24:47 2009 +0000
@@ -59,27 +59,29 @@
 static int
 PS3_Available(void)
 {
-    deprintf(1, "PS3_Available()\n");
+    deprintf(1, "+PS3_Available()\n");
     const char *envr = SDL_getenv("SDL_VIDEODRIVER");
     if ((envr) && (SDL_strcmp(envr, PS3VID_DRIVER_NAME) == 0)) {
         return (1);
     }
 
+    deprintf(1, "-PS3_Available()\n");
     return (0);
 }
 
 static void
 PS3_DeleteDevice(SDL_VideoDevice * device)
 {
-    deprintf(1, "PS3_DeleteDevice()\n");
+    deprintf(1, "+PS3_DeleteDevice()\n");
     SDL_free(device->driverdata);
     SDL_free(device);
+    deprintf(1, "-PS3_DeleteDevice()\n");
 }
 
 static SDL_VideoDevice *
 PS3_CreateDevice(int devindex)
 {
-    deprintf(1, "PS3_CreateDevice()\n");
+    deprintf(1, "+PS3_CreateDevice()\n");
     SDL_VideoDevice *device;
     SDL_VideoData *data;
 
@@ -109,6 +111,7 @@
 
     device->free = PS3_DeleteDevice;
 
+    deprintf(1, "-PS3_CreateDevice()\n");
     return device;
 }
 
@@ -213,6 +216,8 @@
     deprintf(1, "PS3_VideoQuit()\n");
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
 
+    PS3_QuitModes(_this);
+
     /* Unmap framebuffer */
     if (data->frame_buffer) {
         struct fb_fix_screeninfo fb_finfo;
@@ -231,7 +236,7 @@
     }
 
     /* Close device */
-    if (data->fbdev > 0) {
+    if (data->fbdev) {
         /* Give control of frame buffer back to kernel */
         ioctl(data->fbdev, PS3FB_IOCTL_OFF, 0);
         close(data->fbdev);