Module: wine Branch: master Commit: 805473dec7c154798c0035495f08040c62f1a7d2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=805473dec7c154798c0035495f... Author: Thomas Faber <thomas.faber(a)reactos.org> Date: Sun Nov 22 17:51:24 2015 +0100 dinput: Implement MSVC version of enum_callback_wrapper. Signed-off-by: Thomas Faber <thomas.faber(a)reactos.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/dinput_main.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 24e7951..2ff6fd9 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -339,7 +339,21 @@ static DWORD diactionformat_priorityW(LPDIACTIONFORMATW lpdiaf, DWORD genre) return priorityFlags; } -#ifdef __i386__ +#if defined __i386__ && defined _MSC_VER +__declspec(naked) BOOL enum_callback_wrapper(void *callback, const void *instance, void *ref) +{ + __asm + { + push ebp + mov ebp, esp + push [ebp+16] + push [ebp+12] + call [ebp+8] + leave + ret + } +} +#elif defined __i386__ && defined __GNUC__ extern BOOL enum_callback_wrapper(void *callback, const void *instance, void *ref); __ASM_GLOBAL_FUNC( enum_callback_wrapper, "pushl %ebp\n\t"