mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
d3311db6df
commit
8fef9fc0c3
|
@ -63,7 +63,7 @@ void ReadSettings()
|
||||||
|
|
||||||
PortaudioOut->ReadSettings();
|
PortaudioOut->ReadSettings();
|
||||||
SoundtouchCfg::ReadSettings();
|
SoundtouchCfg::ReadSettings();
|
||||||
//DebugConfig::ReadSettings();
|
DebugConfig::ReadSettings();
|
||||||
|
|
||||||
// Sanity Checks
|
// Sanity Checks
|
||||||
// -------------
|
// -------------
|
||||||
|
@ -87,7 +87,7 @@ void WriteSettings()
|
||||||
|
|
||||||
PortaudioOut->WriteSettings();
|
PortaudioOut->WriteSettings();
|
||||||
SoundtouchCfg::WriteSettings();
|
SoundtouchCfg::WriteSettings();
|
||||||
//DebugConfig::WriteSettings();
|
DebugConfig::WriteSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void advanced_dialog()
|
void advanced_dialog()
|
||||||
|
|
|
@ -45,10 +45,22 @@ wchar_t CoresDumpFileName[255];
|
||||||
wchar_t MemDumpFileName[255];
|
wchar_t MemDumpFileName[255];
|
||||||
wchar_t RegDumpFileName[255];
|
wchar_t RegDumpFileName[255];
|
||||||
|
|
||||||
/*namespace DebugConfig {
|
namespace DebugConfig {
|
||||||
|
|
||||||
static const wchar_t* Section = L"DEBUG";
|
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()
|
void ReadSettings()
|
||||||
{
|
{
|
||||||
DebugEnabled = CfgReadBool(Section, L"Global_Enable",0);
|
DebugEnabled = CfgReadBool(Section, L"Global_Enable",0);
|
||||||
|
@ -68,14 +80,15 @@ void ReadSettings()
|
||||||
_MemDump = CfgReadBool(Section, L"Dump_Memory",0);
|
_MemDump = CfgReadBool(Section, L"Dump_Memory",0);
|
||||||
_RegDump = CfgReadBool(Section, L"Dump_Regs",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"WaveLog_Filename", WaveLogFileName, 255,L"logs/SPU2log.wav");
|
||||||
CfgReadStr(Section,L"DMA4Log_Filename", DMA4LogFileName, 255,L"logs/SPU2dma4.dat");
|
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"DMA7Log_Filename", DMA7LogFileName, 255,L"logs/SPU2dma7.dat");
|
||||||
|
|
||||||
CfgReadStr(Section,L"Info_Dump_Filename",CoresDumpFileName,255,L"logs/SPU2Cores.txt");
|
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"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");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,12 +112,22 @@ void WriteSettings()
|
||||||
CfgWriteBool(Section,L"Dump_Memory",_MemDump);
|
CfgWriteBool(Section,L"Dump_Memory",_MemDump);
|
||||||
CfgWriteBool(Section,L"Dump_Regs", _RegDump);
|
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"WaveLog_Filename", WaveLogFileName);
|
||||||
CfgWriteStr(Section,L"DMA4Log_Filename", DMA4LogFileName);
|
CfgWriteStr(Section,L"DMA4Log_Filename", DMA4LogFileName);
|
||||||
CfgWriteStr(Section,L"DMA7Log_Filename", DMA7LogFileName);
|
CfgWriteStr(Section,L"DMA7Log_Filename", DMA7LogFileName);
|
||||||
|
|
||||||
CfgWriteStr(Section,L"Info_Dump_Filename",CoresDumpFileName);
|
CfgWriteStr(Section,L"Info_Dump_Filename",CoresDumpFileName);
|
||||||
CfgWriteStr(Section,L"Mem_Dump_Filename", MemDumpFileName);
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ void SysMessage(const wchar_t *fmt, ...)
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
GTK_MESSAGE_INFO,
|
GTK_MESSAGE_INFO,
|
||||||
GTK_BUTTONS_OK,
|
GTK_BUTTONS_OK,
|
||||||
"%s", msg);
|
"%s", msg.ToUTF8().data());
|
||||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||||
gtk_widget_destroy (dialog);
|
gtk_widget_destroy (dialog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,13 @@
|
||||||
#include "../Global.h"
|
#include "../Global.h"
|
||||||
#include "../Config.h"
|
#include "../Config.h"
|
||||||
|
|
||||||
|
namespace DebugConfig
|
||||||
|
{
|
||||||
|
extern void ReadSettings();
|
||||||
|
extern void WriteSettings();
|
||||||
|
extern void DisplayDialog();
|
||||||
|
}
|
||||||
|
|
||||||
extern void CfgSetSettingsDir(const char* dir);
|
extern void CfgSetSettingsDir(const char* dir);
|
||||||
|
|
||||||
extern void CfgWriteBool(const wchar_t* Section, const wchar_t* Name, bool Value);
|
extern void CfgWriteBool(const wchar_t* Section, const wchar_t* Name, bool Value);
|
||||||
|
|
Loading…
Reference in New Issue