From d315abe8674e37bfe245ffd01273d8707f922847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Wed, 27 Mar 2019 14:48:06 +0100 Subject: [PATCH] Fixed crash on 32-bit builds caused by calling convention mismatch --- include/ViGEm/Client.h | 4 ++-- src/ViGEmClient.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ViGEm/Client.h b/include/ViGEm/Client.h index c490c95..48aaa45 100644 --- a/include/ViGEm/Client.h +++ b/include/ViGEm/Client.h @@ -94,7 +94,7 @@ extern "C" { typedef _Function_class_(EVT_VIGEM_TARGET_ADD_RESULT) - VOID + VOID CALLBACK EVT_VIGEM_TARGET_ADD_RESULT( PVIGEM_CLIENT Client, PVIGEM_TARGET Target, @@ -105,7 +105,7 @@ extern "C" { typedef _Function_class_(EVT_VIGEM_X360_NOTIFICATION) - VOID + VOID CALLBACK EVT_VIGEM_X360_NOTIFICATION( PVIGEM_CLIENT Client, PVIGEM_TARGET Target, diff --git a/src/ViGEmClient.cpp b/src/ViGEmClient.cpp index 0e069ff..6366437 100644 --- a/src/ViGEmClient.cpp +++ b/src/ViGEmClient.cpp @@ -487,7 +487,7 @@ VIGEM_ERROR vigem_target_x360_register_notification( return; } - reinterpret_cast(_Target->Notification)( + PFN_VIGEM_X360_NOTIFICATION(_Target->Notification)( _Client, _Target, notify.LargeMotor, @@ -563,7 +563,7 @@ VIGEM_ERROR vigem_target_ds4_register_notification( return; } - reinterpret_cast(_Target->Notification)( + PFN_VIGEM_DS4_NOTIFICATION(_Target->Notification)( _Client, _Target, notify.Report.LargeMotor,