mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-27 00:26:43 +01:00
2.0.4 told a USB DualSense from a Bluetooth one by asking Windows for the pad's report length, the first time the game read from it. That call was made inside the ReadFile hook with the HID lock held, and hid.dll's HidD_GetPreparsedData itself calls GetOverlappedResult and CloseHandle, which ReSkate also hooks and which take the same lock. Locking it twice on one thread throws, through hid.dll and the game, and the process ends without a crash dump: as a DualSense or DualShock 4 was plugged in, or at startup with one connected. Nothing is asked of the game's handle now. Windows pads every HID read to the device's own report length, so the number of bytes read says USB (64) or Bluetooth (longer). The session-marker fix that the query was for works from that instead.