From a4a7bf91dce560ce5d14b839e5b627d4e726f98b Mon Sep 17 00:00:00 2001 From: mattmenke Date: Sun, 1 Mar 2009 23:53:20 +0000 Subject: [PATCH] LilyPad: fea...@yahoo.it's suggested changes for ICC compatibility git-svn-id: http://pcsx2.googlecode.com/svn/trunk@656 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/LilyPad/Global.h | 37 +++++++++++++++++++++++++++++++++++++ plugins/LilyPad/LilyPad.cpp | 8 -------- plugins/LilyPad/LilyPad.def | 30 +++++++++++++++--------------- 3 files changed, 52 insertions(+), 23 deletions(-) diff --git a/plugins/LilyPad/Global.h b/plugins/LilyPad/Global.h index a531ef59c1..d6a3621b05 100644 --- a/plugins/LilyPad/Global.h +++ b/plugins/LilyPad/Global.h @@ -13,6 +13,12 @@ #define _CRT_SECURE_NO_DEPRECATE #endif +#ifdef _MSC_VER +#define EXPORT_C_(type) extern "C" __declspec(dllexport) type CALLBACK +#else +#define EXPORT_C_(type) extern "C" type +#endif + // Actually works with 0x0400, but need 0x500 to get XBUTTON defines, // 0x501 to get raw input structures, and 0x0600 to get WM_MOUSEHWHEEL. #define WINVER 0x0600 @@ -21,11 +27,42 @@ #include +#include "PS2Etypes.h" +#include "PS2Edefs.h" extern HINSTANCE hInst; // Needed for config screen void GetNameAndVersionString(wchar_t *out); +typedef struct { + unsigned char controllerType; + unsigned short buttonStatus; + unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY; + unsigned char moveX, moveY; + unsigned char reserved[91]; +} PadDataS; + +EXPORT_C_(void) PADupdate(int pad); +EXPORT_C_(u32) PS2EgetLibType(void); +EXPORT_C_(u32) PS2EgetLibVersion2(u32 type); +EXPORT_C_(char*) PSEgetLibName(); +EXPORT_C_(char*) PS2EgetLibName(void); +EXPORT_C_(void) PADshutdown(); +EXPORT_C_(s32) PADinit(u32 flags); +EXPORT_C_(s32) PADopen(void *pDsp); +EXPORT_C_(void) PADclose(); +EXPORT_C_(u8) PADstartPoll(int pad); +EXPORT_C_(u8) PADpoll(u8 value); +EXPORT_C_(u32) PADquery(); +EXPORT_C_(void) PADabout(); +EXPORT_C_(s32) PADtest(); +EXPORT_C_(keyEvent*) PADkeyEvent(); +EXPORT_C_(u32) PADreadPort1 (PadDataS* pads); +EXPORT_C_(u32) PADreadPort2 (PadDataS* pads); +EXPORT_C_(u32) PSEgetLibType(); +EXPORT_C_(u32) PSEgetLibVersion(); +EXPORT_C_(void) PADconfigure(); + #ifdef NO_CRT inline void * malloc(size_t size) { return HeapAlloc(GetProcessHeap(), 0, size); diff --git a/plugins/LilyPad/LilyPad.cpp b/plugins/LilyPad/LilyPad.cpp index ad4b40cc9d..9c979ae75e 100644 --- a/plugins/LilyPad/LilyPad.cpp +++ b/plugins/LilyPad/LilyPad.cpp @@ -1130,14 +1130,6 @@ keyEvent* CALLBACK PADkeyEvent() { return &ev; } -typedef struct { - unsigned char controllerType; - unsigned short buttonStatus; - unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY; - unsigned char moveX, moveY; - unsigned char reserved[91]; -} PadDataS; - u32 CALLBACK PADreadPort1 (PadDataS* pads) { PADstartPoll(1); PADpoll(0x42); diff --git a/plugins/LilyPad/LilyPad.def b/plugins/LilyPad/LilyPad.def index cb18d0fd67..c26aba711c 100644 --- a/plugins/LilyPad/LilyPad.def +++ b/plugins/LilyPad/LilyPad.def @@ -1,22 +1,22 @@ EXPORTS - PS2EgetLibType - PS2EgetLibName - PS2EgetLibVersion2 + PS2EgetLibType + PS2EgetLibName + PS2EgetLibVersion2 PSEgetLibType PSEgetLibName PSEgetLibVersion PADreadPort1 PADreadPort2 - PADinit - PADshutdown - PADopen - PADclose - PADkeyEvent - PADstartPoll - PADpoll - PADquery - PADconfigure - PADtest - PADabout - PADupdate + PADinit + PADshutdown + PADopen + PADclose + PADkeyEvent + PADstartPoll + PADpoll + PADquery + PADconfigure + PADtest + PADabout + PADupdate