mirror of https://github.com/PCSX2/pcsx2.git
FWnull, USBnull, and dev9null now use SetLogFolder.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3114 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
acc6965f62
commit
5e53c9b2c8
|
@ -29,13 +29,31 @@ const u8 build = 6; // increase that with each version
|
|||
static char *libraryName = "FWnull Driver";
|
||||
|
||||
string s_strIniPath="inis/";
|
||||
|
||||
string s_strLogPath = "logs/";
|
||||
|
||||
s8 *fwregs;
|
||||
Config conf;
|
||||
PluginLog FWLog;
|
||||
|
||||
void (*FWirq)();
|
||||
|
||||
void LogInit()
|
||||
{
|
||||
const std::string LogFile(s_strLogPath + "/FWnull.log");
|
||||
setLoggingState();
|
||||
FWLog.Open(LogFile);
|
||||
}
|
||||
|
||||
EXPORT_C_(void) PADSetLogFolder(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
FWLog.Close();
|
||||
LogInit();
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibType()
|
||||
{
|
||||
return PS2E_LT_FW;
|
||||
|
@ -54,8 +72,7 @@ EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
|||
EXPORT_C_(s32) FWinit()
|
||||
{
|
||||
LoadConfig();
|
||||
setLoggingState();
|
||||
FWLog.Open("logs/FWnull.log");
|
||||
LogInit();
|
||||
FWLog.WriteLn("FWnull plugin version %d,%d", revision, build);
|
||||
FWLog.WriteLn("Initializing FWnull");
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ using namespace std;
|
|||
|
||||
#include "USB.h"
|
||||
string s_strIniPath="inis/";
|
||||
string s_strLogPath="logs/";
|
||||
|
||||
const unsigned char version = PS2E_USB_VERSION;
|
||||
const unsigned char revision = 0;
|
||||
|
@ -32,6 +33,23 @@ PluginLog USBLog;
|
|||
|
||||
s8 *usbregs, *ram;
|
||||
|
||||
void LogInit()
|
||||
{
|
||||
const std::string LogFile(s_strLogPath + "/USBnull.log");
|
||||
setLoggingState();
|
||||
USBLog.Open(LogFile);
|
||||
}
|
||||
|
||||
EXPORT_C_(void) PADSetLogFolder(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
USBLog.Close();
|
||||
LogInit();
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibType()
|
||||
{
|
||||
return PS2E_LT_USB;
|
||||
|
@ -50,8 +68,7 @@ EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
|
|||
EXPORT_C_(s32) USBinit()
|
||||
{
|
||||
LoadConfig();
|
||||
setLoggingState();
|
||||
USBLog.Open("logs/USBnull.log");
|
||||
LogInit();
|
||||
USBLog.WriteLn("USBnull plugin version %d,%d", revision, build);
|
||||
USBLog.WriteLn("Initializing USBnull");
|
||||
|
||||
|
|
|
@ -44,9 +44,28 @@ void (*DEV9irq)(int);
|
|||
__aligned16 s8 dev9regs[0x10000];
|
||||
|
||||
string s_strIniPath = "inis/";
|
||||
string s_strLogPath="logs/";
|
||||
|
||||
PluginLog Dev9Log;
|
||||
Config conf;
|
||||
|
||||
void LogInit()
|
||||
{
|
||||
const std::string LogFile(s_strLogPath + "/dev9null.log");
|
||||
setLoggingState();
|
||||
Dev9Log.Open(LogFile);
|
||||
}
|
||||
|
||||
EXPORT_C_(void) PADSetLogFolder(const char* dir)
|
||||
{
|
||||
// Get the path to the log directory.
|
||||
s_strLogPath = (dir==NULL) ? "logs/" : dir;
|
||||
|
||||
// Reload the log file after updated the path
|
||||
Dev9Log.Close();
|
||||
LogInit();
|
||||
}
|
||||
|
||||
EXPORT_C_(u32) PS2EgetLibType()
|
||||
{
|
||||
return PS2E_LT_DEV9;
|
||||
|
@ -66,8 +85,7 @@ EXPORT_C_(s32) DEV9init()
|
|||
{
|
||||
LoadConfig();
|
||||
setLoggingState();
|
||||
|
||||
Dev9Log.Open("logs/dev9null.log");
|
||||
LogInit();
|
||||
Dev9Log.WriteLn("dev9null plugin version %d,%d", revision, build);
|
||||
Dev9Log.WriteLn("Initializing dev9null");
|
||||
// Initialize anything that needs to be initialized.
|
||||
|
|
Loading…
Reference in New Issue