---
name: "save_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/save_joystick_data"
---

# save\_joystick\_data(3alleg)

Saves joystick calibration data. Allegro game programming library.

## NAME

save\_joystick\_data - Saves joystick calibration data. Allegro game programming library.

## SYNOPSIS

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

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

## DESCRIPTION

After all the headache of calibrating the joystick, you may not want to  make your poor users repeat the process every time they run your program.  Call this function to save the joystick calibration data into the  specified configuration file, from which it can later be read by  load\_joystick\_data(). Pass a NULL filename to write the data to the  currently selected configuration file.

## RETURN VALUE

Returns zero on success, non-zero if the data could not be saved.

## SEE ALSO

[**load\_joystick\_data**(3alleg)](/load_joystick_data/3alleg.md), [**set\_config\_file**(3alleg)](/set_config_file/3alleg.md)
