---
name: "al_set_d3d_device_restore_callback"
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_set_d3d_device_restore_callback/3alleg5"
---

# al\_set\_d3d\_device\_restore\_callback(3alleg5)

Allegro 5 API

## NAME

al\_set\_d3d\_device\_restore\_callback - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_direct3d.h>
  void al_set_d3d_device_restore_callback(
     void (*callback)(ALLEGRO_DISPLAY *display))
  ```

## DESCRIPTION

The callback will be called whenever a D3D device that has been reset is restored. In the callback you should restore any d3d resources you have created yourself. The callback receives the affected display as a parameter.

Pass NULL to disable the callback.

## SINCE

5\.1.0
