---
name: "load_joystick_data"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/load_joystick_data/3alleg4"
---

# load\_joystick\_data(3alleg4)

Loads joystick calibration data. Allegro game programming library.

## NAME

load\_joystick\_data - Loads joystick calibration data. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int load\_joystick\_data(const char \*filename);**

## DESCRIPTION

Restores calibration data previously stored by save\_joystick\_data() or  the setup utility. This sets up all aspects of the joystick code: you  don't even need to call install\_joystick() if you are using this  function. Pass a NULL filename to read the data from the currently  selected configuration file.

## RETURN VALUE

Returns zero on success: if it fails the joystick state is undefined and you must reinitialise it from scratch.

## SEE ALSO

**install\_joystick**(3alleg4), **save\_joystick\_data**(3alleg4), **set\_config\_file**(3alleg4)
