diff src/video/ps3/SDL_ps3modes.c @ 3500:4b594623401b

Work in progress on multi-display support: * Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one. * The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height. It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 01 Dec 2009 05:57:15 +0000
parents 94fb40a4a9a7
children f7b03b6838cb
line wrap: on
line diff
--- a/src/video/ps3/SDL_ps3modes.c	Mon Nov 30 21:04:25 2009 +0000
+++ b/src/video/ps3/SDL_ps3modes.c	Tue Dec 01 05:57:15 2009 +0000
@@ -84,7 +84,8 @@
 };
 
 void
-PS3_GetDisplayModes(_THIS) {
+PS3_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
+{
     deprintf(1, "+PS3_GetDisplayModes()\n");
     SDL_DisplayMode mode;
     unsigned int nummodes;
@@ -98,13 +99,13 @@
 
         /* Add DisplayMode to list */
         deprintf(2, "Adding resolution %u x %u\n", ps3fb_modedb[n].w, ps3fb_modedb[n].h);
-        SDL_AddDisplayMode(_this->current_display, &ps3fb_modedb[n]);
+        SDL_AddDisplayMode(display, &ps3fb_modedb[n]);
     }
     deprintf(1, "-PS3_GetDisplayModes()\n");
 }
 
 int
-PS3_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
+PS3_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
 {
     deprintf(1, "+PS3_SetDisplayMode()\n");
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
@@ -123,13 +124,14 @@
 }
 
 void
-PS3_QuitModes(_THIS) {
+PS3_QuitModes(_THIS)
+{
     deprintf(1, "+PS3_QuitModes()\n");
 
     /* There was no mem allocated for driverdata */
     int i, j;
-    for (i = _this->num_displays; i--;) {
-        SDL_VideoDisplay *display = &_this->displays[i];
+    for (i = 0; i < SDL_GetNumVideoDisplays(); ++i) {
+        SDL_VideoDisplay *display = SDL_GetVideoDisplay(i);
         for (j = display->num_display_modes; j--;) {
             display->display_modes[j].driverdata = NULL;
         }