PCSX2, GSdx (patch from avih): Fix broken backward/forward compatibility regarding GSgetTitleInfo

* PCSX2: Added GSgetTileinfo2 and deprecated=removed GSgetTitleInfo
 * GSdx: moved to the new GSgetTitleInfo2
 * New PCSX2 with new GSdx will have the new functionality, all other combos remain with old functionality.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4073 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-12-03 21:18:29 +00:00
parent 49527d952c
commit f2c0ff23a9
5 changed files with 11 additions and 9 deletions

View File

@ -278,7 +278,9 @@ void CALLBACK GSsetFrameSkip(int frameskip);
int CALLBACK GSsetupRecording(int start, void* pData); int CALLBACK GSsetupRecording(int start, void* pData);
void CALLBACK GSreset(); void CALLBACK GSreset();
void CALLBACK GSgetTitleInfo( char* dest, size_t length ); //deprecated: GSgetTitleInfo was used in PCSX2 but no plugin supported it prior to r4070:
//void CALLBACK GSgetTitleInfo( char dest[128] );
void CALLBACK GSgetTitleInfo2( char* dest, size_t length );
void CALLBACK GSwriteCSR(u32 value); void CALLBACK GSwriteCSR(u32 value);
s32 CALLBACK GSfreeze(int mode, freezeData *data); s32 CALLBACK GSfreeze(int mode, freezeData *data);
void CALLBACK GSconfigure(); void CALLBACK GSconfigure();
@ -575,7 +577,7 @@ typedef void (CALLBACK* _GSreadFIFO)(u64 *pMem);
typedef void (CALLBACK* _GSreadFIFO2)(u64 *pMem, int qwc); typedef void (CALLBACK* _GSreadFIFO2)(u64 *pMem, int qwc);
typedef void (CALLBACK* _GSchangeSaveState)(int, const char* filename); typedef void (CALLBACK* _GSchangeSaveState)(int, const char* filename);
typedef void (CALLBACK* _GSgetTitleInfo)(char* dest, size_t length); typedef void (CALLBACK* _GSgetTitleInfo2)(char* dest, size_t length);
typedef void (CALLBACK* _GSirqCallback)(void (*callback)()); typedef void (CALLBACK* _GSirqCallback)(void (*callback)());
typedef void (CALLBACK* _GSprintf)(int timeout, char *fmt, ...); typedef void (CALLBACK* _GSprintf)(int timeout, char *fmt, ...);
typedef void (CALLBACK* _GSsetBaseMem)(void*); typedef void (CALLBACK* _GSsetBaseMem)(void*);
@ -729,7 +731,7 @@ extern _GSreadFIFO GSreadFIFO;
extern _GSreadFIFO2 GSreadFIFO2; extern _GSreadFIFO2 GSreadFIFO2;
extern _GSchangeSaveState GSchangeSaveState; extern _GSchangeSaveState GSchangeSaveState;
extern _GSgetTitleInfo GSgetTitleInfo; extern _GSgetTitleInfo2 GSgetTitleInfo2;
extern _GSmakeSnapshot GSmakeSnapshot; extern _GSmakeSnapshot GSmakeSnapshot;
extern _GSmakeSnapshot2 GSmakeSnapshot2; extern _GSmakeSnapshot2 GSmakeSnapshot2;
extern _GSirqCallback GSirqCallback; extern _GSirqCallback GSirqCallback;

View File

@ -152,7 +152,7 @@ _GSgifSoftReset GSgifSoftReset;
_GSreadFIFO GSreadFIFO; _GSreadFIFO GSreadFIFO;
_GSreadFIFO2 GSreadFIFO2; _GSreadFIFO2 GSreadFIFO2;
_GSchangeSaveState GSchangeSaveState; _GSchangeSaveState GSchangeSaveState;
_GSgetTitleInfo GSgetTitleInfo; _GSgetTitleInfo2 GSgetTitleInfo2;
_GSmakeSnapshot GSmakeSnapshot; _GSmakeSnapshot GSmakeSnapshot;
_GSmakeSnapshot2 GSmakeSnapshot2; _GSmakeSnapshot2 GSmakeSnapshot2;
_GSirqCallback GSirqCallback; _GSirqCallback GSirqCallback;
@ -185,7 +185,7 @@ static void CALLBACK GS_printf(int timeout, char *fmt, ...)
Console.WriteLn(msg); Console.WriteLn(msg);
} }
void CALLBACK GS_getTitleInfo( char* dest, size_t length ) void CALLBACK GS_getTitleInfo2( char* dest, size_t length )
{ {
// Just return a generic "GS" title -- a plugin actually implementing this feature // Just return a generic "GS" title -- a plugin actually implementing this feature
// should return a title such as "GSdx" or "ZZogl" instead. --air // should return a title such as "GSdx" or "ZZogl" instead. --air
@ -375,7 +375,7 @@ static const LegacyApi_ReqMethod s_MethMessReq_GS[] =
{ "GSsetVsync", (vMeth**)&GSsetVsync, (vMeth*)GS_setVsync }, { "GSsetVsync", (vMeth**)&GSsetVsync, (vMeth*)GS_setVsync },
{ "GSsetExclusive", (vMeth**)&GSsetExclusive, (vMeth*)GS_setExclusive }, { "GSsetExclusive", (vMeth**)&GSsetExclusive, (vMeth*)GS_setExclusive },
{ "GSchangeSaveState",(vMeth**)&GSchangeSaveState,(vMeth*)GS_changeSaveState }, { "GSchangeSaveState",(vMeth**)&GSchangeSaveState,(vMeth*)GS_changeSaveState },
{ "GSgetTitleInfo", (vMeth**)&GSgetTitleInfo, (vMeth*)GS_getTitleInfo }, { "GSgetTitleInfo2", (vMeth**)&GSgetTitleInfo2, (vMeth*)GS_getTitleInfo2 },
{ NULL } { NULL }
}; };

View File

@ -386,7 +386,7 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
double fps = wxGetApp().FpsManager.GetFramerate(); double fps = wxGetApp().FpsManager.GetFramerate();
char gsDest[128]; char gsDest[128];
GSgetTitleInfo( gsDest, sizeof(gsDest) ); GSgetTitleInfo2( gsDest, sizeof(gsDest) );
const wxChar* limiterStr = L"None"; const wxChar* limiterStr = L"None";

View File

@ -478,7 +478,7 @@ EXPORT_C GSgetLastTag(uint32* tag)
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif
EXPORT_C GSgetTitleInfo(char* dest, size_t length) EXPORT_C GSgetTitleInfo2(char* dest, size_t length)
{ {
if (!s_gs->m_GStitleInfoBuffer[0]) if (!s_gs->m_GStitleInfoBuffer[0])
strcpy(dest, "GSdx"); strcpy(dest, "GSdx");

View File

@ -42,4 +42,4 @@ EXPORTS
GSgetLastTag GSgetLastTag
GSReplay GSReplay
GSBenchmark GSBenchmark
GSgetTitleInfo GSgetTitleInfo2