Fixed picking up the correct mapping for virtual controllers on Android

Fixes https://github.com/libsdl-org/SDL/issues/5662
This commit is contained in:
Sam Lantinga 2022-05-18 23:48:15 -07:00
parent f7b774a7e0
commit 47f1cb550d
3 changed files with 14 additions and 16 deletions

View file

@ -203,8 +203,8 @@ SDL_JoystickAttachVirtualInner(const SDL_VirtualJoystickDesc *desc)
*guid16++ = 0;
*guid16++ = SDL_SwapLE16(hwdata->desc.product_id);
*guid16++ = 0;
*guid16++ = SDL_SwapLE16((Uint16)hwdata->desc.button_mask);
*guid16++ = SDL_SwapLE16((Uint16)hwdata->desc.axis_mask);
*guid16++ = 0;
*guid16++ = 0; /* This will be overwritten below with the virtual controller signature */
/* Note that this is a Virtual device and what subtype it is */
hwdata->guid.data[14] = 'v';