---
name: "JSUpdate"
section: "3"
platform: "linux"
package: "libjsw-dev"
version: "1:1.5.5-1+b1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/JSUpdate"
---

# JSUpdate(3)

Joystick device management and updating

## NAME

JSUpdate - Joystick device management and updating

## SYNTAX

\#include \<jsw.h\>

int JSUpdate(\
\
         js\_data\_struct \**jsd*\
 )

## ARGUMENTS

- *jsd*

  Specifies the pointer to the joystick data structure, which should have been set up by a prior call to JSInit.

## DESCRIPTION

The JSUpdate function checks for changes in control positions of the joystick device specified in the *jsd* structure. If any changes are detected then the values in the *jsd* structure will be updated.

## RETURN VALUE

The JSUpdate function returns JSGotEvent if there were one or more control positions updated or JSNoEvent if there are no changes in control positions.

Changes can be retrieved from the *jsd* structure using [JSGetAxisCoeffNZ(3)](/JSGetAxisCoeffNZ/3.md), [JSGetAxisCoeff(3)](/JSGetAxisCoeff/3.md), and [JSGetButtonState(3)](/JSGetButtonState/3.md).

## SEE ALSO

[JSIntro(3)](/JSIntro/3.md) [JSInit(3)](/JSInit/3.md) [JSClose(3)](/JSClose/3.md) [JSGetAxisCoeffNZ(3)](/JSGetAxisCoeffNZ/3.md) [JSGetAxisCoeff(3)](/JSGetAxisCoeff/3.md) [JSGetButtonState(3)](/JSGetButtonState/3.md)
