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);
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);
s32 CALLBACK GSfreeze(int mode, freezeData *data);
void CALLBACK GSconfigure();
@ -575,7 +577,7 @@ typedef void (CALLBACK* _GSreadFIFO)(u64 *pMem);
typedef void (CALLBACK* _GSreadFIFO2)(u64 *pMem, int qwc);
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* _GSprintf)(int timeout, char *fmt, ...);
typedef void (CALLBACK* _GSsetBaseMem)(void*);
@ -729,7 +731,7 @@ extern _GSreadFIFO GSreadFIFO;
extern _GSreadFIFO2 GSreadFIFO2;
extern _GSchangeSaveState GSchangeSaveState;
extern _GSgetTitleInfo GSgetTitleInfo;
extern _GSgetTitleInfo2 GSgetTitleInfo2;
extern _GSmakeSnapshot GSmakeSnapshot;
extern _GSmakeSnapshot2 GSmakeSnapshot2;
extern _GSirqCallback GSirqCallback;

View File

@ -152,7 +152,7 @@ _GSgifSoftReset GSgifSoftReset;
_GSreadFIFO GSreadFIFO;
_GSreadFIFO2 GSreadFIFO2;
_GSchangeSaveState GSchangeSaveState;
_GSgetTitleInfo GSgetTitleInfo;
_GSgetTitleInfo2 GSgetTitleInfo2;
_GSmakeSnapshot GSmakeSnapshot;
_GSmakeSnapshot2 GSmakeSnapshot2;
_GSirqCallback GSirqCallback;
@ -185,7 +185,7 @@ static void CALLBACK GS_printf(int timeout, char *fmt, ...)
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
// 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 },
{ "GSsetExclusive", (vMeth**)&GSsetExclusive, (vMeth*)GS_setExclusive },
{ "GSchangeSaveState",(vMeth**)&GSchangeSaveState,(vMeth*)GS_changeSaveState },
{ "GSgetTitleInfo", (vMeth**)&GSgetTitleInfo, (vMeth*)GS_getTitleInfo },
{ "GSgetTitleInfo2", (vMeth**)&GSgetTitleInfo2, (vMeth*)GS_getTitleInfo2 },
{ NULL }
};

View File

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

View File

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

View File

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