mirror of https://github.com/libsdl-org/SDL.git
Fixed raw input device GUIDs changing randomly between runs
On Windows 11, apparently HidD_GetManufacturerString() and HidD_GetProductString() can return TRUE without actually filling in any string data.
Fixes https://github.com/libsdl-org/SDL/issues/12566
(cherry picked from commit 4fc9509ab7)
This commit is contained in:
parent
46a51b4298
commit
52146cf067
|
|
@ -908,9 +908,11 @@ static void RAWINPUT_AddDevice(HANDLE hDevice)
|
|||
char *product_string = NULL;
|
||||
WCHAR string[128];
|
||||
|
||||
string[0] = 0;
|
||||
if (SDL_HidD_GetManufacturerString(hFile, string, sizeof(string))) {
|
||||
manufacturer_string = WIN_StringToUTF8W(string);
|
||||
}
|
||||
string[0] = 0;
|
||||
if (SDL_HidD_GetProductString(hFile, string, sizeof(string))) {
|
||||
product_string = WIN_StringToUTF8W(string);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue