diff options
-rw-r--r-- | ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h | 15 | ||||
-rw-r--r-- | ftnoir_protocol_vjoy/vjoy.def | 5 |
2 files changed, 17 insertions, 3 deletions
diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h index 30c4b9b5..5a1d30fb 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h @@ -115,6 +115,15 @@ typedef struct _JOYSTICK_STATE #include <poppack.h> -extern "C" BOOL __stdcall VJoy_Initialize(PCHAR name, PCHAR serial); -extern "C" VOID __stdcall VJoy_Shutdown(); -extern "C" BOOL __stdcall VJoy_UpdateJoyState(int id, PJOYSTICK_STATE pJoyState); +#undef EXTERN_C +#if _MSC_VER +# define EXTERN_C +#else +# define EXTERN_C extern "C" +#endif +#if _MSC_VER +# pragma comment(linker, "/implib:vjoy.def") +#endif +EXTERN_C BOOL __stdcall VJoy_Initialize(PCHAR name, PCHAR serial); +EXTERN_C VOID __stdcall VJoy_Shutdown(); +EXTERN_C BOOL __stdcall VJoy_UpdateJoyState(int id, PJOYSTICK_STATE pJoyState); diff --git a/ftnoir_protocol_vjoy/vjoy.def b/ftnoir_protocol_vjoy/vjoy.def new file mode 100644 index 00000000..aea590a4 --- /dev/null +++ b/ftnoir_protocol_vjoy/vjoy.def @@ -0,0 +1,5 @@ +LIBRARY vjoy.dll +IMPORTS +VJoy_Initialize = _VJoy_Initialize +VJoy_Shutdown = _VJoy_Shutdown +VJoy_UpdateJoyState = _VJoy_UpdateJoyState |