GSnull: More cleanup on the logging code. And lets actually put return characters in the log. :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4965 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2011-11-12 04:09:46 +00:00
parent f47ef5e644
commit c3536a1eb4
4 changed files with 8 additions and 12 deletions

View File

@ -43,7 +43,7 @@ typedef struct _keyEvent keyEvent;
#define EXPORT_C_(type) extern "C" __attribute__((externally_visible,visibility("default"))) type
#endif
#define GS_LOG GSLog::Log
//#define GS_LOG GSLog::Log
extern const unsigned char version;
extern const unsigned char revision;

View File

@ -38,7 +38,6 @@ namespace GSLog
{
bool result = true;
#ifdef GS_LOG
const std::string LogFile(s_strLogPath + "/GSnull.log");
gsLog = fopen(LogFile.c_str(), "w");
@ -55,20 +54,17 @@ namespace GSLog
WriteLn("GSnull plugin version %d,%d",revision,build);
WriteLn("GS init.");
#endif
return result;
}
void Close()
{
#ifdef GS_LOG
if (gsLog)
{
fclose(gsLog);
gsLog = NULL;
}
#endif
}
void Log(char *fmt, ...)
@ -103,7 +99,7 @@ namespace GSLog
vsprintf(msg, fmt, list);
va_end(list);
GS_LOG(msg);
Log(msg);
fprintf(stderr, "GSnull:%s", msg);
}
@ -117,7 +113,7 @@ namespace GSLog
vsprintf(msg, fmt, list);
va_end(list);
GS_LOG(msg);
Log("%s\n", msg);
fprintf(stderr, "GSnull:%s\n", msg);
}
};

View File

@ -36,7 +36,7 @@ template<int index> void _GSgifTransfer(const u32 *pMem, u32 size)
while (size > 0)
{
//GS_LOG(_T("Transfer(%08x, %d) START\n"), pMem, size);
//GSLog::Writeln(_T("Transfer(%08x, %d) START\n"), pMem, size);
if (path->nloop == 0)
{
path->setTag(pMem);
@ -93,7 +93,7 @@ template<int index> void _GSgifTransfer(const u32 *pMem, u32 size)
case GIF_FLG_REGLIST:
{
//GS_Log("%8.8x%8.8x %d L", ((u32*)&gs.regs)[1], *(u32*)&gs.regs, path->tag.nreg/4);
//GSLog::Writeln("%8.8x%8.8x %d L", ((u32*)&gs.regs)[1], *(u32*)&gs.regs, path->tag.nreg/4);
size *= 2;
@ -115,7 +115,7 @@ template<int index> void _GSgifTransfer(const u32 *pMem, u32 size)
case GIF_FLG_IMAGE2: // Used in the DirectX version, so we'll use it here too.
{
int len = min(size, path->nloop);
//GS_LOG("GIF_FLG_IMAGE(%d)=%d", gs.imageTransfer, len);
//GSLog::Writeln("GIF_FLG_IMAGE(%d)=%d", gs.imageTransfer, len);
switch (gs.imageTransfer)
{
@ -152,7 +152,7 @@ template<int index> void _GSgifTransfer(const u32 *pMem, u32 size)
}
default: // GIF_IMAGE
GS_LOG("*** WARNING **** Unexpected GIFTag flag.");
GSLog::WriteLn("*** WARNING **** Unexpected GIFTag flag.");
assert(0);
path->nloop = 0;
break;

View File

@ -93,7 +93,7 @@ typedef struct
reg = 0;
//if ((nreg == 4) && (regs == GIF_REG_A_D)) adonly = true;
// ZZLog::GS_Log("GIFtag: %8.8lx_%8.8lx_%8.8lx_%8.8lx: EOP=%d, NLOOP=%x, FLG=%x, NREG=%d, PRE=%d",
// GSLog::Writeln"GIFtag: %8.8lx_%8.8lx_%8.8lx_%8.8lx: EOP=%d, NLOOP=%x, FLG=%x, NREG=%d, PRE=%d",
// data[3], data[2], data[1], data[0],
// path->eop, path->nloop, mode, path->nreg, tag.PRE);
}