---
name: "SDL_AddHintCallback"
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_AddHintCallback"
---

# SDL\_AddHintCallback(3)

Add a function to watch a particular hint.

## NAME

SDL\_AddHintCallback - Add a function to watch a particular hint.

## HEADER FILE

Defined in SDL3/SDL\_hints.h

## SYNOPSIS

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

**bool SDL\_AddHintCallback(const char \*name, SDL\_HintCallback callback, void \*userdata);**

## DESCRIPTION

The callback function is called \_during\_ this function, to provide it an initial value, and again each time the hint's value changes.

## FUNCTION PARAMETERS

- *name*

  the hint to watch.

- *callback*

  An  **SDL\_HintCallback**\
    function that will be called when the hint value changes.

- *userdata*

  a pointer to pass to the callback function.

## RETURN VALUE

Returns true on success or false on failure; call

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

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_RemoveHintCallback**(3)](/SDL_RemoveHintCallback/3.md)
