From b421d4e7e06f977436b6e6195b95ca44d884e0c0 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 2 Jun 2019 20:50:28 -0400 Subject: Add guile-sdl2 manual. --- manuals/guile-sdl2/Game-Controllers.html | 192 +++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 manuals/guile-sdl2/Game-Controllers.html (limited to 'manuals/guile-sdl2/Game-Controllers.html') diff --git a/manuals/guile-sdl2/Game-Controllers.html b/manuals/guile-sdl2/Game-Controllers.html new file mode 100644 index 0000000..1b77c66 --- /dev/null +++ b/manuals/guile-sdl2/Game-Controllers.html @@ -0,0 +1,192 @@ + + + + + + +Game Controllers (Guile-SDL2) + + + + + + + + + + + + + + + + + + + + +
+

+Previous: , Up: Input   [Contents][Index]

+
+
+ +

3.3.4 Game Controllers

+ +
+
(use-modules (sdl2 input game-controller))
+
+ +
+
Procedure: load-game-controller-mappings! file
+

Load game controller mapping from file and return the number of +mappings added this way. +

+

See https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt +for a community maintained controller mapping file. +

+ +
+
Procedure: open-game-controller joystick-index
+

Return a game controller object for the physical joystick device associated +with the joystick-index. +

+ +
+
Procedure: close-game-controller controller
+

Close controller. +

+ +
+
Procedure: game-controller? controller
+

Close controller. +

+ +
+
Procedure: game-controller-attached? controller
+

Return #t if controller is currently in use. +

+ +
+
Procedure: game-controller-joystick controller
+

Return the underlying joystick object associated with controller. +

+ +
+
Procedure: game-controller-name controller
+

Return the human readable name for controller. +

+ +
+
Procedure: game-controller-axis controller axis
+

Return a number in the range [-32768, 32767] representing the +current state of axis on controller. +

+

axis may be one of the following symbols: +

    +
  • left-x +
  • left-y +
  • right-x +
  • right-y +
  • trigger-left +
  • trigger-right +
+
+ +
+
Procedure: game-controller-button-pressed? controller button
+

Return #t if button is pressed on controller. +

+

button may be one of the following symbols: +

    +
  • a +
  • b +
  • x +
  • y +
  • back +
  • guide +
  • start +
  • left-stick +
  • right-stick +
  • left-shoulder +
  • right-shoulder +
  • dpad-up +
  • dpad-down +
  • dpad-left +
  • dpad-right +
+
+ +
+
Procedure: game-controller-index? joystick-index
+

Return #t if joystick-index is a valid game controller index. +

+ + + + + + -- cgit v1.2.3