mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Another small DSP HLE update.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1123 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -73,36 +73,35 @@ CUCode_AX::~CUCode_AX()
|
||||
// ----------------
|
||||
void CUCode_AX::SaveLogFile(std::string f, int resizeTo, bool type, bool Wii)
|
||||
{
|
||||
if (!File::IsDirectory("Logs/Mail")) File::CreateDir("Logs/Mail");
|
||||
std::ostringstream ci;
|
||||
std::ostringstream cType;
|
||||
|
||||
ci << (resizeTo - 1); // write ci
|
||||
cType << type; // write cType
|
||||
if(gpName.length() > 0) // thios is currently off in the Release build
|
||||
{
|
||||
if (!File::IsDirectory("Logs/Mail")) File::CreateDir("Logs/Mail");
|
||||
std::ostringstream ci;
|
||||
std::ostringstream cType;
|
||||
|
||||
ci << (resizeTo - 1); // write ci
|
||||
cType << type; // write cType
|
||||
|
||||
std::string FileName = "Logs/Mail/"; FileName += gpName;
|
||||
FileName += "_sep"; FileName += ci.str(); FileName += "_sep"; FileName += cType.str();
|
||||
FileName += Wii ? "_sepWii_sep" : "_sepGC_sep"; FileName += ".log";
|
||||
std::string FileName = "Logs/Mail/"; FileName += gpName;
|
||||
FileName += "_sep"; FileName += ci.str(); FileName += "_sep"; FileName += cType.str();
|
||||
FileName += Wii ? "_sepWii_sep" : "_sepGC_sep"; FileName += ".log";
|
||||
|
||||
FILE* fhandle = fopen(FileName.c_str(), "w");
|
||||
fprintf(fhandle, f.c_str());
|
||||
fflush(fhandle); fhandle = NULL;
|
||||
FILE* fhandle = fopen(FileName.c_str(), "w");
|
||||
fprintf(fhandle, f.c_str());
|
||||
fflush(fhandle); fhandle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ============================================
|
||||
// Save the logged AX mail
|
||||
// ----------------
|
||||
void CUCode_AX::SaveLog_(bool Wii, const char* _fmt, ...)
|
||||
void CUCode_AX::SaveLog_(bool Wii, const char* _fmt, va_list ap)
|
||||
{
|
||||
if(m_frame->ScanMails)
|
||||
{
|
||||
char Msg[512*10];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, _fmt);
|
||||
char Msg[512];
|
||||
vsprintf(Msg, _fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
//wxMessageBox( wxString::Format("SaveLog_ again: %s\n", Msg) );
|
||||
|
||||
@ -508,8 +507,11 @@ void CUCode_AX::Update()
|
||||
// -----------
|
||||
|
||||
|
||||
// Shortcut
|
||||
void CUCode_AX::SaveLog(const char* _fmt, ...) { if(m_frame) SaveLog_(false, _fmt); }
|
||||
// Shortcut to avoid having to write SaveLog(false, ...) every time
|
||||
void CUCode_AX::SaveLog(const char* _fmt, ...)
|
||||
{
|
||||
va_list ap; va_start(ap, _fmt); if(m_frame) SaveLog_(false, _fmt, ap); va_end(ap);
|
||||
}
|
||||
|
||||
|
||||
// ============================================
|
||||
|
Reference in New Issue
Block a user