---
name: "load_joystick_data"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/load_joystick_data"
---

# load\_joystick\_data(3alleg)

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**(3alleg)](/install_joystick/3alleg.md), [**save\_joystick\_data**(3alleg)](/save_joystick_data/3alleg.md), [**set\_config\_file**(3alleg)](/set_config_file/3alleg.md)
