mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-19 01:38:12 +00:00
SDL_GetJoystickGUIDInfo: byte-swap vendor, product and version values.
Reference issue: https://github.com/libsdl-org/SDL/issues/5907
This commit is contained in:
@@ -1761,13 +1761,13 @@ void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *prod
|
|||||||
/* guid16[6] is product version */
|
/* guid16[6] is product version */
|
||||||
) {
|
) {
|
||||||
if (vendor) {
|
if (vendor) {
|
||||||
*vendor = guid16[2];
|
*vendor = SDL_SwapLE16(guid16[2]);
|
||||||
}
|
}
|
||||||
if (product) {
|
if (product) {
|
||||||
*product = guid16[4];
|
*product = SDL_SwapLE16(guid16[4]);
|
||||||
}
|
}
|
||||||
if (version) {
|
if (version) {
|
||||||
*version = guid16[6];
|
*version = SDL_SwapLE16(guid16[6]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (vendor) {
|
if (vendor) {
|
||||||
|
Reference in New Issue
Block a user