This is new wiki software and old wiki content. It's a work in progress!
Here's the explanation.
Be gentle, report bugs, leave feedback on pages, or just edit them yourself! Thanks!

SDL Wiki

SDL_HINT_ACCELEROMETER_AS_JOYSTICK

A hint that specifies whether the Android / iOS built-in accelerometer should be listed as a joystick device, rather than listing actual joysticks only.

Values

0

list only real joysticks and accept input from them

1

list real joysticks along with the accelerometer as if it were a 3 axis joystick (the default)

Default

By default SDL will list real joysticks along with the accelerometer as if it were a 3 axis joystick.

Code Examples

#include "SDL.h"

int main(int argc, char* argv[])
{
    // This disables the use of gyroscopes as axis device
    SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
}

Remarks

The hint is supported for iOS since SDL 2.0.4.

Version

This hint is available since SDL 2.0.2.


CategoryDefine, CategoryHints


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.