internal/gamepaddb: bug fix: crash at addAndroidDefaultMappings

Closes #2076
This commit is contained in:
Hajime Hoshi 2022-04-19 23:35:58 +09:00
parent 945f4af2ae
commit dc811f9329

View File

@ -594,6 +594,8 @@ func addAndroidDefaultMappings(id string) bool {
} }
gamepadButtonMappings[id] = map[StandardButton]*mapping{} gamepadButtonMappings[id] = map[StandardButton]*mapping{}
gamepadAxisMappings[id] = map[StandardAxis]*mapping{}
if buttonMask&(1<<SDLControllerButtonA) != 0 { if buttonMask&(1<<SDLControllerButtonA) != 0 {
gamepadButtonMappings[id][StandardButtonRightBottom] = &mapping{ gamepadButtonMappings[id][StandardButtonRightBottom] = &mapping{
Type: mappingTypeButton, Type: mappingTypeButton,