4 ms·
Nice writeup! I probably would've kept unplugging my joystick for years. Impressive how good of a job Ghidra's decompiler did on libcef - this is almost on par
by lima 6y ago
Nice writeup! I probably would've kept unplugging my joystick for years. Impressive how good of a job Ghidra's decompiler did on libcef - this is almost on par with HexRays.
Chromium is open source, so we can take a look at the source code:
https://source.chromium.org/chromium/chromium/src/+/master:device/gamepad/raw_input_data_fetcher_win.cc;l=102;drc=60d523b9de536fd5f122313f06f585db50e3e661 https://source.chromium.org/chromium/chromium/src/+/master:d...
(it's actually the wrong function - StopMonitor - but it references the same DeviceUsages constant that StartMonitor uses so it still worked)
Nvidia probably uses the Gamepad API in whatever they use CEF for:
https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API...
A more stable patching approach would be to find the JS sources and patch that.
- dsafonov 6y agoThe real function of interest was GetRawInputDevices (https://source.chromium.org/chromium/chromium/src/+/master:device/gamepad/raw_input_data_fetcher_win.cc;l=48;drc=776c4b650f0fde01c0ba718a115704f5c16adf98;bpv=1;bpt=1 https://source.chromium.org/chromium/chromium/src/+/master:d...), not either of its two call sites. ;-)