diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 0a1b6b879a..01c773d74b 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -383,7 +383,6 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug) void CBoot::UpdateDebugger_MapLoaded(const char *_gameID) { - HLE::PatchFunctions(); Host_NotifyMapLoaded(); Host_UpdateMemoryView(); } @@ -507,9 +506,7 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara) } } if (LoadMapFromFilename(_StartupPara.m_strFilename, gameID)) - { HLE::PatchFunctions(); - } } break; @@ -520,7 +517,8 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara) CDolLoader dolLoader(_StartupPara.m_strFilename.c_str()); PC = dolLoader.GetEntryPoint(); #ifdef _DEBUG - LoadMapFromFilename(_StartupPara.m_strFilename); + if (LoadMapFromFilename(_StartupPara.m_strFilename)) + HLE::PatchFunctions(); #endif } break; @@ -569,7 +567,8 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara) } Boot_BIN(_StartupPara.m_strFilename); - LoadMapFromFilename(_StartupPara.m_strFilename); + if (LoadMapFromFilename(_StartupPara.m_strFilename)) + HLE::PatchFunctions(); } break; @@ -580,7 +579,8 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara) DVDInterface::SetDiscInside(false); if (Load_BIOS(_StartupPara.m_strBios)) { - LoadMapFromFilename(_StartupPara.m_strFilename); + if (LoadMapFromFilename(_StartupPara.m_strFilename)) + HLE::PatchFunctions(); } else { diff --git a/Source/Core/Core/Src/Boot/Boot_ELF.cpp b/Source/Core/Core/Src/Boot/Boot_ELF.cpp index 4ec7d67b5a..0dad6d0a24 100644 --- a/Source/Core/Core/Src/Boot/Boot_ELF.cpp +++ b/Source/Core/Core/Src/Boot/Boot_ELF.cpp @@ -1,5 +1,6 @@ #include "../PowerPC/PowerPC.h" #include "Boot.h" +#include "../HLE/HLE.h" #include "Boot_ELF.h" #include "ElfReader.h" #include "MappedFile.h" @@ -8,8 +9,9 @@ bool CBoot::IsElfWii(const char *filename) { Common::IMappedFile *mapfile = Common::IMappedFile::CreateMappedFile(); bool ok = mapfile->Open(filename); - if (!ok) return false; - size_t filesize = mapfile->GetSize(); + if (!ok) + return false; + size_t filesize = (size_t)mapfile->GetSize(); u8 *ptr = mapfile->Lock(0, filesize); u8 *mem = new u8[filesize]; memcpy(mem, ptr, filesize); @@ -39,7 +41,10 @@ bool CBoot::Boot_ELF(const char *filename) reader.LoadInto(0x80000000); if (!reader.LoadSymbols()) { - LoadMapFromFilename(filename); + if (LoadMapFromFilename(filename)) + HLE::PatchFunctions(); + } else { + HLE::PatchFunctions(); } delete [] mem; diff --git a/Source/Core/Core/Src/Host.h b/Source/Core/Core/Src/Host.h index 243da88fde..b227f68a17 100644 --- a/Source/Core/Core/Src/Host.h +++ b/Source/Core/Core/Src/Host.h @@ -48,8 +48,6 @@ void Host_SetDebugMode(bool enable); void Host_SetWaitCursor(bool enable); -void Host_CreateDisplay(); -void Host_CloseDisplay(); void Host_UpdateStatusBar(const char* _pText); #endif diff --git a/Source/Core/Core/Src/PowerPC/SymbolDB.cpp b/Source/Core/Core/Src/PowerPC/SymbolDB.cpp index 6e1341d212..33bae92cea 100644 --- a/Source/Core/Core/Src/PowerPC/SymbolDB.cpp +++ b/Source/Core/Core/Src/PowerPC/SymbolDB.cpp @@ -160,7 +160,8 @@ void SymbolDB::FillInCallers() } else { - LOG(HLE,"FillInCallers tries to fill data in an unknown function 0x%08x.", FunctionAddress); + //LOG(HLE,"FillInCallers tries to fill data in an unknown function 0x%08x.", FunctionAddress); + // TODO - analyze the function instead. } } } diff --git a/Source/Core/DebuggerWX/src/CodeWindow.cpp b/Source/Core/DebuggerWX/src/CodeWindow.cpp index e52b59d39a..e084dfbf6b 100644 --- a/Source/Core/DebuggerWX/src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/src/CodeWindow.cpp @@ -580,7 +580,6 @@ void CCodeWindow::Update() } UpdateButtonStates(); - Host_UpdateLogDisplay(); } diff --git a/Source/Core/DolphinWX/src/Main.cpp b/Source/Core/DolphinWX/src/Main.cpp index 25bce4fd6c..4356f887e0 100644 --- a/Source/Core/DolphinWX/src/Main.cpp +++ b/Source/Core/DolphinWX/src/Main.cpp @@ -31,7 +31,7 @@ IMPLEMENT_APP(DolphinApp) -CFrame * main_frame = NULL; +CFrame* main_frame = NULL; CCodeWindow* g_pCodeWindow = NULL; // The `main program' equivalent, creating the windows and returning the @@ -65,10 +65,6 @@ bool DolphinApp::OnInit() bool UseDebugger = false; #if wxUSE_CMDLINE_PARSER - // - // What this does is get all the command line arguments - // and treat each one as a file to put to the initial playlist - // wxCmdLineEntryDesc cmdLineDesc[] = { {wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP}, @@ -82,7 +78,7 @@ bool DolphinApp::OnInit() // get filenames from the command line if (parser.Parse() != 0) { - return(false); + return false; } UseDebugger = parser.Found(_T("debugger")); @@ -99,9 +95,9 @@ bool DolphinApp::OnInit() #endif #else #ifdef _DEBUG - const char *title = "Dolphin Debug SVN Linux Build"; // Do this for now + const char *title = "Dolphin Debug SVN Linux"; #else - const char *title = "Dolphin SVN Linux Build"; + const char *title = "Dolphin SVN Linux"; #endif #endif main_frame = new CFrame((wxFrame*) NULL, wxID_ANY, wxString::FromAscii(title), @@ -115,8 +111,7 @@ bool DolphinApp::OnInit() } SetTopWindow(main_frame); - - return(true); + return true; } @@ -240,14 +235,6 @@ void Host_SetWaitCursor(bool enable) } - -void Host_CreateDisplay() -{} - - -void Host_CloseDisplay() -{} - void Host_UpdateStatusBar(const char* _pText) { wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATESTATUSBAR); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp index 3163cabc66..b575490c42 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp @@ -128,7 +128,7 @@ void TextureMngr::Cleanup() { TexCache::iterator iter = textures.begin(); - while(iter != textures.end()) { + while (iter != textures.end()) { if (frameCount > 20 + iter->second.frameCount) { if (!iter->second.isRenderTarget) { iter->second.Destroy(); @@ -171,7 +171,7 @@ inline u32 _rotl(u32 x, int shift) { #endif TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width, int height, int format, int tlutaddr, int tlutfmt) { - if (address == 0 ) + if (address == 0) return NULL; TexCache::iterator iter = textures.find(address); @@ -182,11 +182,11 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width u32 palhash = 0xc0debabe; if (palSize) { - if (palSize>16) - palSize = 16; //let's not do excessive amount of checking + if (palSize > 32) + palSize = 32; //let's not do excessive amount of checking u8 *pal = g_VideoInitialize.pGetMemoryPointer(tlutaddr); if (pal != 0) { - for (int i=0; i