mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Map the guide button by default on Android 11
This commit is contained in:
parent
3755f6920f
commit
99ed0d7ab9
@ -978,19 +978,12 @@ static ControllerMapping_t *SDL_CreateMappingForAndroidController(const char *na
|
|||||||
if (button_mask & (1 << SDL_CONTROLLER_BUTTON_BACK)) {
|
if (button_mask & (1 << SDL_CONTROLLER_BUTTON_BACK)) {
|
||||||
SDL_strlcat(mapping_string, "back:b4,", sizeof(mapping_string));
|
SDL_strlcat(mapping_string, "back:b4,", sizeof(mapping_string));
|
||||||
}
|
}
|
||||||
#if 0 /* The guide button generally isn't functional (or acts as a home button) on most Android controllers */
|
|
||||||
if (button_mask & (1 << SDL_CONTROLLER_BUTTON_GUIDE)) {
|
if (button_mask & (1 << SDL_CONTROLLER_BUTTON_GUIDE)) {
|
||||||
SDL_strlcat(mapping_string, "guide:b5,", sizeof(mapping_string));
|
/* The guide button generally isn't functional (or acts as a home button) on most Android controllers before Android 11 */
|
||||||
#if 0 /* Actually this will be done in Steam */
|
if (SDL_GetAndroidSDKVersion() >= 30 /* Android 11 */) {
|
||||||
} else if (button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
|
SDL_strlcat(mapping_string, "guide:b5,", sizeof(mapping_string));
|
||||||
/* The guide button doesn't exist, use the start button instead,
|
}
|
||||||
so you can do Steam guide button chords and open the Steam overlay.
|
|
||||||
*/
|
|
||||||
SDL_strlcat(mapping_string, "guide:b6,", sizeof(mapping_string));
|
|
||||||
button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_START);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
|
if (button_mask & (1 << SDL_CONTROLLER_BUTTON_START)) {
|
||||||
SDL_strlcat(mapping_string, "start:b6,", sizeof(mapping_string));
|
SDL_strlcat(mapping_string, "start:b6,", sizeof(mapping_string));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user