diff src/video/pandora/SDL_pandora.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 ca5663493497
children 64ce267332c6
line wrap: on
line diff
--- a/src/video/pandora/SDL_pandora.c	Mon Nov 30 21:04:25 2009 +0000
+++ b/src/video/pandora/SDL_pandora.c	Tue Dec 01 05:57:15 2009 +0000
@@ -108,10 +108,6 @@
     device->VideoQuit = PND_videoquit;
     device->GetDisplayModes = PND_getdisplaymodes;
     device->SetDisplayMode = PND_setdisplaymode;
-    device->SetDisplayPalette = PND_setdisplaypalette;
-    device->GetDisplayPalette = PND_getdisplaypalette;
-    device->SetDisplayGammaRamp = PND_setdisplaygammaramp;
-    device->GetDisplayGammaRamp = PND_getdisplaygammaramp;
     device->CreateWindow = PND_createwindow;
     device->CreateWindowFrom = PND_createwindowfrom;
     device->SetWindowTitle = PND_setwindowtitle;
@@ -191,55 +187,18 @@
 }
 
 void
-PND_getdisplaymodes(_THIS)
+PND_getdisplaymodes(_THIS, SDL_VideoDisplay * display)
 {
 
 }
 
 int
-PND_setdisplaymode(_THIS, SDL_DisplayMode * mode)
+PND_setdisplaymode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
 {
     return 0;
 }
 
 int
-PND_setdisplaypalette(_THIS, SDL_Palette * palette)
-{
-    SDL_DisplayData *didata =
-        (SDL_DisplayData *) SDL_CurrentDisplay.driverdata;
-
-    /* Setting display palette operation has been failed */
-    return -1;
-}
-
-int
-PND_getdisplaypalette(_THIS, SDL_Palette * palette)
-{
-    SDL_DisplayData *didata =
-        (SDL_DisplayData *) SDL_CurrentDisplay.driverdata;
-
-    /* Getting display palette operation has been failed */
-    return -1;
-}
-
-int
-PND_setdisplaygammaramp(_THIS, Uint16 * ramp)
-{
-    SDL_DisplayData *didata =
-        (SDL_DisplayData *) SDL_CurrentDisplay.driverdata;
-
-    /* Setting display gamma ramp operation has been failed */
-    return -1;
-}
-
-int
-PND_getdisplaygammaramp(_THIS, Uint16 * ramp)
-{
-    /* Getting display gamma ramp operation has been failed */
-    return -1;
-}
-
-int
 PND_createwindow(_THIS, SDL_Window * window)
 {
     SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
@@ -458,7 +417,7 @@
     SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
     SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
     SDL_DisplayData *didata =
-        (SDL_DisplayData *) SDL_CurrentDisplay.driverdata;
+        (SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->driverdata;
     EGLBoolean status;
     int32_t gfstatus;
     EGLint configs;
@@ -857,7 +816,7 @@
     SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
     SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
     SDL_DisplayData *didata =
-        (SDL_DisplayData *) SDL_CurrentDisplay.driverdata;
+        (SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->driverdata;
 
 
     if (phdata->egl_initialized != SDL_TRUE) {