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:
arcum42 committed 2010-05-29 10:46:48 +00:00
1 parent acc6965f62
commit 5e53c9b2c8
3 files changed
+59 -7

No files matched your search

+19 -2
View File
@@ -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");