---
name: "SDL_GetCurrentDisplayMode"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetCurrentDisplayMode"
---

# SDL\_GetCurrentDisplayMode(3)

Get information about the current display mode.

## NAME

SDL\_GetCurrentDisplayMode - Get information about the current display mode.

## HEADER FILE

Defined in SDL3/SDL\_video.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**const SDL\_DisplayMode \* SDL\_GetCurrentDisplayMode(SDL\_DisplayID displayID);**

## DESCRIPTION

There's a difference between this function and

**SDL\_GetDesktopDisplayMode** () when SDL runs fullscreen and has changed the resolution. In that case this function will return the current display mode, and not the previous native display mode.

## FUNCTION PARAMETERS

- *displayID*

  the instance ID of the display to query.

## RETURN VALUE

(const  **SDL\_DisplayMode**\
  \*) Returns a pointer to the desktop display mode or NULL on failure; call

**SDL\_GetError** () for more information.

## THREAD SAFETY

This function should only be called on the main thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_GetDesktopDisplayMode**(3)](/SDL_GetDesktopDisplayMode/3.md), **•**(3), [**SDL\_GetDisplays**(3)](/SDL_GetDisplays/3.md)
