PDL_SetFullscreen
Description
Your app can call this API to go from being a plug-in to being fullscreen. It sets up a direct rendering channel for optimal performance, allowing you total control over the screen.
In addition to managing internals, this API calls SDL_SetVideoMode with the passed parameters and returns the surface generated. This is your new screen, the previous one becomes invalid.
For more information on the fields passed to this API, see the SDL_SetVideoMode documentation.
Syntax
SDL_Surface *PDL_SetFullscreen(int width, int height, int bpp, Uint32 flags);
| Argument | Description |
|---|---|
| width | New screen width |
| height | New screen height |
| bpp | Bits per pixel |
| flags | Flags |
Returns
On success, returns a pointer to a new SDL_Surface.
Returns NULL under the following error conditions:
- Not a plug-in
- App is already fullscreen.
- Could not init IPC.
- Failed to discern HW resolution
- Failed to get portal size
Note: In all cases where an error is returned, your app can call PDL_GetError to get a plain-text error description. This is usually more informative than NULL.