---
name: "al_get_display_mode"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_get_display_mode/3alleg5"
---

# al\_get\_display\_mode(3alleg5)

Allegro 5 API

## NAME

al\_get\_display\_mode - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  ALLEGRO_DISPLAY_MODE *al_get_display_mode(int index, ALLEGRO_DISPLAY_MODE *mode)
  ```

## DESCRIPTION

Retrieves a fullscreen mode. Display parameters should not be changed between a call of al\_get\_num\_display\_modes(3alleg5) and al\_get\_display\_mode(3alleg5). index must be between 0 and the number returned from al\_get\_num\_display\_modes-1. mode must be an allocated ALLEGRO\_DISPLAY\_MODE structure. This function will return NULL on failure, and the mode parameter that was passed in on success.

## SEE ALSO

ALLEGRO\_DISPLAY\_MODE(3alleg5), al\_get\_num\_display\_modes(3alleg5)
