src/joystick/SDL_gamecontroller.c
changeset 11780 874fb85ef7b7
parent 11664 c677bf234773
child 11781 c2f3e4187c9d
equal deleted inserted replaced
11779:b71dcf275cd5 11780:874fb85ef7b7
   921 #endif
   921 #endif
   922 #if defined(__ANDROID__)
   922 #if defined(__ANDROID__)
   923     if (!mapping && SDL_SYS_IsDPAD_DeviceIndex(device_index)) {
   923     if (!mapping && SDL_SYS_IsDPAD_DeviceIndex(device_index)) {
   924         SDL_bool existing;
   924         SDL_bool existing;
   925         char mapping_string[1024];
   925         char mapping_string[1024];
   926         SDL_snprintf(mapping_string, sizeof(mapping_string), "none,%s,a:b0,b:b1,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,", name);
   926         SDL_snprintf(mapping_string, sizeof(mapping_string), "none,%s,a:b0,b:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,", name);
   927         mapping = SDL_PrivateAddMappingForGUID(guid, mapping_string,
   927         mapping = SDL_PrivateAddMappingForGUID(guid, mapping_string,
   928                           &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
   928                           &existing, SDL_CONTROLLER_MAPPING_PRIORITY_DEFAULT);
   929     }
   929     }
   930 #endif /* __ANDROID__ */
   930 #endif /* __ANDROID__ */
   931     SDL_UnlockJoysticks();
   931     SDL_UnlockJoysticks();