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
This commit is contained in:
mattmenke 2009-03-01 23:53:20 +00:00
parent 7d4a7d3c10
commit a4a7bf91dc
3 changed files with 52 additions and 23 deletions

View File

@ -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 <windows.h>
#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);

View File

@ -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);

View File

@ -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