PgGetVideoMode
![]() |
![]() |
![]() |
![]() |
PgGetVideoMode()
Get the current video mode
Synopsis:
int PgGetVideoMode( PgDisplaySettings_t *settings );
Library:
ph
Description:
This function gets the current video mode, storing information about it in the PgDisplaySettings_t structure pointed to by settings, which includes at least the following:
- unsigned mode
- The number of the current mode for the video card.
- int refresh
- The refresh rate, in Hz. A value of 0 indicates that the default refresh rate for this mode (usually 60Hz) is being used.
- unsigned flags
- There are currently no flags defined.
![]() |
You must target this function at a specific card by calling PdSetTargetDevice(). PgGetVideoMode() blocks until the operation is complete. |
Returns:
- 0
- Success.
- -1
- An error occurred.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PdSetTargetDevice(), PgGetGraphicsHWCaps(), PgGetVideoModeInfo(), PgGetVideoModeList(), PgSetVideoMode()
“Video modes” in the Raw Drawing and Animation chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)

