Null plugins should probably disable HW/addr logging by default...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2427 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-01-14 00:57:01 +00:00
parent 29dc098721
commit 1511703bdb
5 changed files with 35 additions and 17 deletions

View File

@ -135,9 +135,9 @@ struct PluginConf
fclose(ConfFile);
}
int ReadInt(std::string item)
int ReadInt(const std::string& item, int defval)
{
int value = -1;
int value = defval;
std::string buf = item + " = %d\n";
if (ConfFile) fscanf(ConfFile, buf.c_str(), &value);

View File

@ -62,7 +62,7 @@ void LoadConfig()
return;
}
conf.Log = Ini.ReadInt("logging");
conf.Log = Ini.ReadInt("logging", 0);
setLoggingState();
Ini.Close();
}

View File

@ -62,7 +62,7 @@ void LoadConfig()
return;
}
conf.Log = Ini.ReadInt("logging");
conf.Log = Ini.ReadInt("logging", 0);
setLoggingState();
Ini.Close();
}

View File

@ -100,10 +100,13 @@ EXPORT_C_(u8) USBread8(u32 addr)
switch(addr)
{
// Handle any appropriate addresses here.
case 0x1f801600: USBLog.WriteLn("*Unknown 8 bit read at address %lx", addr); break;
case 0x1f801600:
USBLog.WriteLn("(USBnull) 8 bit read at address %lx", addr);
break;
default:
//value = usbRu8(addr);
USBLog.WriteLn("*Unknown 8 bit read at address %lx", addr);
USBLog.WriteLn("*(USBnull) 8 bit read at address %lx", addr);
break;
}
return value;
@ -116,10 +119,13 @@ EXPORT_C_(u16) USBread16(u32 addr)
switch(addr)
{
// Handle any appropriate addresses here.
case 0x1f801600: USBLog.WriteLn("*Unknown 16 bit read at address %lx", addr); break;
case 0x1f801600:
USBLog.WriteLn("(USBnull) 16 bit read at address %lx", addr);
break;
default:
//value = usbRu16(addr);
USBLog.WriteLn("*Unknown 16 bit read at address %lx", addr);
USBLog.WriteLn("(USBnull) 16 bit read at address %lx", addr);
}
return value;
}
@ -131,10 +137,13 @@ EXPORT_C_(u32) USBread32(u32 addr)
switch(addr)
{
// Handle any appropriate addresses here.
case 0x1f801600: USBLog.WriteLn("*Unknown 32 bit read at address %lx", addr); break;
case 0x1f801600:
USBLog.WriteLn("(USBnull) 32 bit read at address %lx", addr);
break;
default:
//value = usbRu32(addr);
USBLog.WriteLn("*Unknown 32 bit read at address %lx", addr);
USBLog.WriteLn("(USBnull) 32 bit read at address %lx", addr);
}
return value;
}
@ -144,10 +153,13 @@ EXPORT_C_(void) USBwrite8(u32 addr, u8 value)
switch(addr)
{
// Handle any appropriate addresses here.
case 0x1f801600: USBLog.WriteLn("*Unknown 8 bit write at address %lx value %x", addr, value); break;
case 0x1f801600:
USBLog.WriteLn("(USBnull) 8 bit write at address %lx value %x", addr, value);
break;
default:
//usbRu8(addr) = value;
USBLog.WriteLn("*Unknown 8 bit write at address %lx value %x", addr, value);
USBLog.WriteLn("(USBnull) 8 bit write at address %lx value %x", addr, value);
}
}
@ -156,10 +168,13 @@ EXPORT_C_(void) USBwrite16(u32 addr, u16 value)
switch(addr)
{
// Handle any appropriate addresses here.
case 0x1f801600: USBLog.WriteLn("*Unknown 8 bit write at address %lx value %x", addr, value); break;
case 0x1f801600:
USBLog.WriteLn("(USBnull) 16 bit write at address %lx value %x", addr, value);
break;
default:
//usbRu16(addr) = value;
USBLog.WriteLn("*Unknown 16 bit write at address %lx value %x", addr, value);
USBLog.WriteLn("(USBnull) 16 bit write at address %lx value %x", addr, value);
}
}
@ -168,10 +183,13 @@ EXPORT_C_(void) USBwrite32(u32 addr, u32 value)
switch(addr)
{
// Handle any appropriate addresses here.
case 0x1f801600: USBLog.WriteLn("*Unknown 8 bit write at address %lx value %x", addr, value); break;
case 0x1f801600:
USBLog.WriteLn("(USBnull) 16 bit write at address %lx value %x", addr, value);
break;
default:
//usbRu32(addr) = value;
USBLog.WriteLn("*Unknown 32 bit write at address %lx value %x", addr, value);
USBLog.WriteLn("(USBnull) 32 bit write at address %lx value %x", addr, value);
}
}

View File

@ -62,7 +62,7 @@ void LoadConfig()
return;
}
conf.Log = Ini.ReadInt("logging");
conf.Log = Ini.ReadInt("logging",0);
Ini.Close();
}