spu2-x: Start working on the debug settings a bit.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2645 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-02-26 09:07:26 +00:00
parent d3311db6df
commit 8fef9fc0c3
4 changed files with 41 additions and 11 deletions

View File

@ -63,7 +63,7 @@ void ReadSettings()
PortaudioOut->ReadSettings();
SoundtouchCfg::ReadSettings();
//DebugConfig::ReadSettings();
DebugConfig::ReadSettings();
// Sanity Checks
// -------------
@ -87,7 +87,7 @@ void WriteSettings()
PortaudioOut->WriteSettings();
SoundtouchCfg::WriteSettings();
//DebugConfig::WriteSettings();
DebugConfig::WriteSettings();
}
void advanced_dialog()

View File

@ -45,10 +45,22 @@ wchar_t CoresDumpFileName[255];
wchar_t MemDumpFileName[255];
wchar_t RegDumpFileName[255];
/*namespace DebugConfig {
namespace DebugConfig {
static const wchar_t* Section = L"DEBUG";
static void set_default_filenames()
{
swprintf(AccessLogFileName, 255, L"logs/SPU2Log.txt");
swprintf(WaveLogFileName, 255, L"logs/SPU2log.wav");
swprintf(DMA4LogFileName, 255, L"logs/logs/SPU2dma4.dat");
swprintf(DMA7LogFileName, 255, L"logs/SPU2dma7.dat");
swprintf(CoresDumpFileName, 255, L"logs/SPU2Cores.txt");
swprintf(MemDumpFileName, 255, L"logs/SPU2mem.dat");
swprintf(RegDumpFileName, 255, L"logs/SPU2regs.dat");
}
void ReadSettings()
{
DebugEnabled = CfgReadBool(Section, L"Global_Enable",0);
@ -67,15 +79,16 @@ void ReadSettings()
_CoresDump = CfgReadBool(Section, L"Dump_Info",0);
_MemDump = CfgReadBool(Section, L"Dump_Memory",0);
_RegDump = CfgReadBool(Section, L"Dump_Regs",0);
CfgReadStr(Section,L"Access_Log_Filename",AccessLogFileName,255,L"logs/SPU2Log.txt");
set_default_filenames();
/*CfgReadStr(Section,L"Access_Log_Filename",AccessLogFileName,255,L"logs/SPU2Log.txt");
CfgReadStr(Section,L"WaveLog_Filename", WaveLogFileName, 255,L"logs/SPU2log.wav");
CfgReadStr(Section,L"DMA4Log_Filename", DMA4LogFileName, 255,L"logs/SPU2dma4.dat");
CfgReadStr(Section,L"DMA7Log_Filename", DMA7LogFileName, 255,L"logs/SPU2dma7.dat");
CfgReadStr(Section,L"Info_Dump_Filename",CoresDumpFileName,255,L"logs/SPU2Cores.txt");
CfgReadStr(Section,L"Mem_Dump_Filename", MemDumpFileName, 255,L"logs/SPU2mem.dat");
CfgReadStr(Section,L"Reg_Dump_Filename", RegDumpFileName, 255,L"logs/SPU2regs.dat");
CfgReadStr(Section,L"Reg_Dump_Filename", RegDumpFileName, 255,L"logs/SPU2regs.dat");*/
}
@ -98,13 +111,23 @@ void WriteSettings()
CfgWriteBool(Section,L"Dump_Info", _CoresDump);
CfgWriteBool(Section,L"Dump_Memory",_MemDump);
CfgWriteBool(Section,L"Dump_Regs", _RegDump);
CfgWriteStr(Section,L"Access_Log_Filename",AccessLogFileName);
set_default_filenames();
/*CfgWriteStr(Section,L"Access_Log_Filename",AccessLogFileName);
CfgWriteStr(Section,L"WaveLog_Filename", WaveLogFileName);
CfgWriteStr(Section,L"DMA4Log_Filename", DMA4LogFileName);
CfgWriteStr(Section,L"DMA7Log_Filename", DMA7LogFileName);
CfgWriteStr(Section,L"Info_Dump_Filename",CoresDumpFileName);
CfgWriteStr(Section,L"Mem_Dump_Filename", MemDumpFileName);
CfgWriteStr(Section,L"Reg_Dump_Filename", RegDumpFileName);
}*/
CfgWriteStr(Section,L"Reg_Dump_Filename", RegDumpFileName);*/
}
void DisplayDialog()
{
ReadSettings();
WriteSettings();
}
}

View File

@ -55,7 +55,7 @@ void SysMessage(const wchar_t *fmt, ...)
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
"%s", msg);
"%s", msg.ToUTF8().data());
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}

View File

@ -21,6 +21,13 @@
#include "../Global.h"
#include "../Config.h"
namespace DebugConfig
{
extern void ReadSettings();
extern void WriteSettings();
extern void DisplayDialog();
}
extern void CfgSetSettingsDir(const char* dir);
extern void CfgWriteBool(const wchar_t* Section, const wchar_t* Name, bool Value);