From 63ecc01cc68ef8a49188292fd7357aaa41598b33 Mon Sep 17 00:00:00 2001 From: nakeee Date: Mon, 23 Mar 2009 21:15:37 +0000 Subject: [PATCH] Resolve lost symbols in HLE/LLE-t DSP git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2744 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_DSP_HLE/Src/Globals.h | 3 ++ .../Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp | 40 ++++++++----------- .../Plugin_DSP_LLE-testing/Src/SConscript | 2 +- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Globals.h b/Source/Plugins/Plugin_DSP_HLE/Src/Globals.h index 094dc97173..160df46a1a 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Globals.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Globals.h @@ -22,6 +22,7 @@ #include "pluginspecs_dsp.h" #include "StringUtil.h" +#include "../../../Core/Core/Src/ConfigManager.h" // FIXME extern DSPInitialize g_dspInitialize; extern bool gSSBM; @@ -37,4 +38,6 @@ u16 Memory_Read_U16(u32 _uAddress); u32 Memory_Read_U32(u32 _uAddress); float Memory_Read_Float(u32 _uAddress); +extern PLUGIN_GLOBALS* globals; + #endif diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp index 5d04a7c4d1..4a9f81eaa4 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp @@ -24,6 +24,7 @@ extern CDebugger* m_frame; #endif #include +#include "../Globals.h" #include "../PCHW/Mixer.h" #include "../MailHandler.h" @@ -41,7 +42,6 @@ extern bool gSSBMremedy2; extern bool gSequenced; extern bool gVolume; extern bool gReset; -extern std::string gpName; std::vector sMailLog, sMailTime; // ----------- @@ -67,27 +67,24 @@ CUCode_AX::~CUCode_AX() } -// ============================================ // Save file to harddrive -// ---------------- void CUCode_AX::SaveLogFile(std::string f, int resizeTo, bool type, bool Wii) { - if (gpName.length() > 0) // this is currently off in the Release build - { - std::ostringstream ci; - std::ostringstream cType; - - ci << (resizeTo - 1); // write ci - cType << type; // write cType - - std::string FileName = FULL_MAIL_LOGS_DIR + 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, "%s", f.c_str()); - fflush(fhandle); fhandle = NULL; - } + //#ifdef DEBUG_LEVEL + std::ostringstream ci; + std::ostringstream cType; + + ci << (resizeTo - 1); // write ci + cType << type; // write cType + + std::string FileName = FULL_MAIL_LOGS_DIR + ((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.GetUniqueID(); + 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, "%s", f.c_str()); + fflush(fhandle); fhandle = NULL; + //#endif } @@ -103,8 +100,6 @@ void CUCode_AX::SaveLog_(bool Wii, const char* _fmt, va_list ap) if(m_frame->ScanMails) { - //wxMessageBox( wxString::Format("SaveLog_ again: %s\n", Msg) ); - if(strcmp(Msg, "Begin") == 0) { TmpMailLog = ""; @@ -113,14 +108,13 @@ if(m_frame->ScanMails) { if(saveNext && saveNext < 100) // limit because saveNext is not initialized { - //Console::Print("End"); // Save the timestamps and comment std::ostringstream ci; ci << (saveNext - 1); TmpMailLog += "\n\n"; TmpMailLog += "-----------------------------------------------------------------------\n"; - TmpMailLog += "Current mail: " + gpName + " mail " + ci.str() + "\n"; + TmpMailLog += "Current mail: " + ((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.GetUniqueID() + " mail " + ci.str() + "\n"; if(Wii) TmpMailLog += "Current CRC: " + StringFromFormat("0x%08x \n\n", _CRC); diff --git a/Source/Plugins/Plugin_DSP_LLE-testing/Src/SConscript b/Source/Plugins/Plugin_DSP_LLE-testing/Src/SConscript index fa21ad37db..ab1ef604e5 100644 --- a/Source/Plugins/Plugin_DSP_LLE-testing/Src/SConscript +++ b/Source/Plugins/Plugin_DSP_LLE-testing/Src/SConscript @@ -39,7 +39,7 @@ files = [ lleenv = env.Clone() lleenv.Append( CXXFLAGS = [ '-fPIC' ], - LIBS = [ 'common' ], + LIBS = [ 'common', 'audiocommon' ], ) lleenv.SharedLibrary(env['plugin_dir']+name, files)