libx52
0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
|
libx52 performs all its operations with a device context pointer. The application must call libx52_init before performing any operation, and must call libx52_exit prior to terminating.
Also, the application must call libx52_connect to ensure that it connects to a supported joystick. This function must be called after libx52_init
Example Initialization/Deinitialization Code
Most libx52 functions to update the joystick state do not directly write to the connected joystick, but only update internal data structures within the device context. In order to actually update the joystick, the application must call libx52_update. This function writes the updates to the joystick and resets any internal state.
Example
Most libx52 functions return a standard libx52_error_code integer value that indicates the status of the operation. As long as the operation succeeded, the function will return LIBX52_SUCCESS. Other values returned indicate a failure of some sort.
libx52_strerror can convert the return code into a descriptive string that may be displayed to users.
libx52_strerror automatically handles internationalization. As long as your application sets up the locale correctly, and the error strings have been translated to that locale, the returned strings will correspond to the translated values for your locale.