Rémi Bernon (@rbernon) commented about dlls/winebus.sys/bus_sdl.c:
desc.version = 0; }
- guid = pSDL_JoystickGetGUID(joystick); - pSDL_JoystickGetGUIDString(guid, guid_str, sizeof(guid_str)); - ntdll_umbstowcs(guid_str, strlen(guid_str) + 1, desc.serialnumber, ARRAY_SIZE(desc.serialnumber)); + if (pSDL_JoystickGetSerial && (sdl_serial = pSDL_JoystickGetSerial(joystick))) + { + ntdll_umbstowcs(sdl_serial, strlen(sdl_serial) + 1, desc.serialnumber, ARRAY_SIZE(desc.serialnumber)); + } + else + { + // Overcooked! All You Can Eat only adds controllers with unique serial numbers + // Prefer keeping serial numbers unique over keeping them consistent across runs + TRACE("Making up serial number for %s %s\n", product, debugstr_w(desc.serialnumber));
Tracing `desc.serialnumber` isn't very useful here, you could move the trace a bit below and trace the joystick name and its made up serial instead. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1551#note_17637