Commit 5a92edee035588116939d34a33ad32bfd15af312

Sam Lantinga 2020-11-06T15:54:18

Don't try to map the accelerometer as a game controller

diff --git a/test/controllermap.c b/test/controllermap.c
index 258e336..4642e59 100644
--- a/test/controllermap.c
+++ b/test/controllermap.c
@@ -708,6 +708,8 @@ main(int argc, char *argv[])
     int i;
     SDL_Joystick *joystick;
 
+    SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
+
     /* Enable standard application logging */
     SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
 
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 3910675..0394e5c 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -228,6 +228,8 @@ main(int argc, char *argv[])
     int nController = 0;
     char guid[64];
 
+    SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, "0");
+
     /* Enable standard application logging */
     SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);