mirror of https://github.com/PCSX2/pcsx2.git
pcsx2|common|gsnull: Remove GSprintf API
It's not really used, and the OSD uses a different API. The specified calling convention (stdcall) is also incorrect since variadic functions are caller-clean, not callee-clean. The compilers ignore the stdcall and just use cdecl (I think), though it does trigger a -Wcast-calling-convention on clang.
This commit is contained in:
parent
58f2b6c257
commit
96b412ebb8
|
@ -265,7 +265,6 @@ void CALLBACK GSchangeSaveState(int, const char *filename);
|
|||
void CALLBACK GSmakeSnapshot(char *path);
|
||||
void CALLBACK GSmakeSnapshot2(char *pathname, int *snapdone, int savejpg);
|
||||
void CALLBACK GSirqCallback(void (*callback)());
|
||||
void CALLBACK GSprintf(int timeout, char *fmt, ...);
|
||||
void CALLBACK GSsetBaseMem(void *);
|
||||
void CALLBACK GSsetGameCRC(int crc, int gameoptions);
|
||||
|
||||
|
@ -588,7 +587,6 @@ typedef void(CALLBACK *_GSinitReadFIFO2)(u64 *pMem, int qwc);
|
|||
typedef void(CALLBACK *_GSchangeSaveState)(int, const char *filename);
|
||||
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 *);
|
||||
typedef void(CALLBACK *_GSsetGameCRC)(int, int);
|
||||
typedef void(CALLBACK *_GSsetFrameSkip)(int frameskip);
|
||||
|
@ -750,7 +748,6 @@ extern _GSgetTitleInfo2 GSgetTitleInfo2;
|
|||
extern _GSmakeSnapshot GSmakeSnapshot;
|
||||
extern _GSmakeSnapshot2 GSmakeSnapshot2;
|
||||
extern _GSirqCallback GSirqCallback;
|
||||
extern _GSprintf GSprintf;
|
||||
extern _GSsetBaseMem GSsetBaseMem;
|
||||
extern _GSsetGameCRC GSsetGameCRC;
|
||||
extern _GSsetFrameSkip GSsetFrameSkip;
|
||||
|
|
|
@ -174,7 +174,6 @@ _GSgetTitleInfo2 GSgetTitleInfo2;
|
|||
_GSmakeSnapshot GSmakeSnapshot;
|
||||
_GSmakeSnapshot2 GSmakeSnapshot2;
|
||||
_GSirqCallback GSirqCallback;
|
||||
_GSprintf GSprintf;
|
||||
_GSsetBaseMem GSsetBaseMem;
|
||||
_GSsetGameCRC GSsetGameCRC;
|
||||
_GSsetFrameSkip GSsetFrameSkip;
|
||||
|
@ -192,17 +191,6 @@ static void CALLBACK GS_setFrameSkip(int frameskip) {}
|
|||
static void CALLBACK GS_setVsync(int enabled) {}
|
||||
static void CALLBACK GS_setExclusive(int isExcl) {}
|
||||
static void CALLBACK GS_changeSaveState( int, const char* filename ) {}
|
||||
static void CALLBACK GS_printf(int timeout, char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char msg[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(msg, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
Console.WriteLn(msg);
|
||||
}
|
||||
|
||||
void CALLBACK GS_getTitleInfo2( char* dest, size_t length )
|
||||
{
|
||||
|
@ -410,7 +398,6 @@ static const LegacyApi_ReqMethod s_MethMessReq_GS[] =
|
|||
|
||||
{ "GSmakeSnapshot", (vMeth**)&GSmakeSnapshot, (vMeth*)GS_makeSnapshot },
|
||||
{ "GSirqCallback", (vMeth**)&GSirqCallback, (vMeth*)GS_irqCallback },
|
||||
{ "GSprintf", (vMeth**)&GSprintf, (vMeth*)GS_printf },
|
||||
{ "GSsetBaseMem", (vMeth**)&GSsetBaseMem, NULL },
|
||||
{ "GSwriteCSR", (vMeth**)&GSwriteCSR, NULL },
|
||||
{ "GSsetGameCRC", (vMeth**)&GSsetGameCRC, (vMeth*)GS_setGameCRC },
|
||||
|
|
|
@ -372,7 +372,7 @@ namespace Implementations
|
|||
// FIXME: Some of the trace logs will require recompiler resets to be activated properly.
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
SetTraceConfig().Enabled = !EmuConfig.Trace.Enabled;
|
||||
GSprintf(10, const_cast<char*>(EmuConfig.Trace.Enabled ? "Logging Enabled." : "Logging Disabled."));
|
||||
Console.WriteLn(EmuConfig.Trace.Enabled ? "Logging Enabled." : "Logging Disabled.");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -82,19 +82,6 @@ PS2EgetLibVersion2(u32 type)
|
|||
return (version << 16) | (revision << 8) | build;
|
||||
}
|
||||
|
||||
EXPORT_C_(void)
|
||||
GSprintf(int timeout, char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char msg[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(msg, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
GSLog::Print("GSprintf:%s", msg);
|
||||
}
|
||||
|
||||
// basic funcs
|
||||
EXPORT_C_(void)
|
||||
GSsetSettingsDir(const char *dir)
|
||||
|
|
|
@ -25,7 +25,6 @@ EXPORTS
|
|||
GSmakeSnapshot @20
|
||||
GSmakeSnapshot2 @21
|
||||
GSirqCallback @22
|
||||
GSprintf @23
|
||||
GSsetBaseMem @24
|
||||
GSsetGameCRC @25
|
||||
GSsetFrameSkip @26
|
||||
|
|
Loading…
Reference in New Issue