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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404241
This commit is contained in:
Sam Lantinga 2009-12-01 05:57:15 +00:00
parent 3e860cdcf9
commit 1cd715e9db
29 changed files with 446 additions and 485 deletions

View file

@ -50,7 +50,8 @@ extern "C" {
* \sa SDL_GetDesktopDisplayMode()
* \sa SDL_GetCurrentDisplayMode()
* \sa SDL_GetClosestDisplayMode()
* \sa SDL_SetDisplayMode()
* \sa SDL_SetWindowDisplayMode()
* \sa SDL_GetWindowDisplayMode()
*/
typedef struct
{
@ -427,23 +428,25 @@ extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const
/**
* \brief Set the display mode used when a fullscreen window is visible
* on the currently selected display.
* on the currently selected display. By default the window's
* dimensions and the desktop format and refresh rate are used.
*
* \param mode The mode to use, or NULL for the desktop mode.
* \param mode The mode to use, or NULL for the default mode.
*
* \return 0 on success, or -1 if setting the display mode failed.
*
* \sa SDL_SetWindowFullscreen()
*/
extern DECLSPEC int SDLCALL SDL_SetFullscreenDisplayMode(const SDL_DisplayMode
extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_WindowID windowID,
const SDL_DisplayMode
* mode);
/**
* \brief Fill in information about the display mode used when a fullscreen
* window is visible on the currently selected display.
*/
extern DECLSPEC int SDLCALL SDL_GetFullscreenDisplayMode(SDL_DisplayMode *
mode);
extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_WindowID windowID,
SDL_DisplayMode * mode);
/**
* \brief Set the palette entries for indexed display modes.
@ -680,7 +683,7 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_WindowID windowID);
*
* \return 0 on success, or -1 if setting the display mode failed.
*
* \sa SDL_SetFullscreenDisplayMode()
* \sa SDL_WindowDisplayMode()
*/
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_WindowID windowID,
int fullscreen);