Skip to content

Commit

Permalink
DInputHook: GUID memcmp instead
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Jan 4, 2024
1 parent 6ebf76e commit 17805a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/DInputHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ HRESULT WINAPI DInputHook::create_hooked(
auto iface = (LPDIRECTINPUT8W)*ppvOut;

// TODO: IID_IDirectInput8A or we don't care?
if (iface != nullptr && riidltf == IID_IDirectInput8W) {
if (iface != nullptr && memcmp(&riidltf, &IID_IDirectInput8W, sizeof(GUID)) == 0) {
// Its not necessary to make a full blown vtable hook for this because
// the vtable will always be the same for IDirectInput8W
if (g_dinput_hook->m_enum_devices_hook == nullptr) {
Expand Down

0 comments on commit 17805a4

Please sign in to comment.