android: only real joysticks allowed, no accelerometer

This commit is contained in:
Sigrid Solveig Haflínudóttir 2021-12-29 23:29:51 +01:00
parent 72a26cb0c9
commit 4651d07e57
1 changed files with 1 additions and 0 deletions

View File

@ -155,6 +155,7 @@ init(void)
as.callback = audio_callback;
as.samples = 512;
as.userdata = NULL;
SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0)
return error("sdl", SDL_GetError());
#ifdef __ANDROID__