From dd7eba0bb9bb34cf40f2765119947ad379f83155 Mon Sep 17 00:00:00 2001 From: daco65 Date: Wed, 2 Sep 2009 15:38:04 +0000 Subject: [PATCH] nothing special >_> git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4161 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/FrameTools.cpp | 7 ++++--- .../Plugin_VideoDX9/Src/TextureCache.cpp | 17 +++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 8395543c4a..d7535112f7 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -93,7 +93,7 @@ extern "C" { wxCheatsWindow* CheatsWindow; wxInfoWindow* InfoWindow; -///////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// // Create menu items // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ void CFrame::CreateMenu() @@ -237,10 +237,10 @@ void CFrame::CreateMenu() // Associate the menu bar with the frame SetMenuBar(menuBar); } -///////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////// // Create toolbar items // ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar) @@ -249,6 +249,7 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar) h = m_Bitmaps[Toolbar_FileOpen].GetHeight(); ToolBar->SetToolBitmapSize(wxSize(w, h)); + ToolBar->AddTool(wxID_OPEN, _T("Open"), m_Bitmaps[Toolbar_FileOpen], _T("Open file...")); ToolBar->AddTool(wxID_REFRESH, _T("Refresh"), m_Bitmaps[Toolbar_Refresh], _T("Refresh")); ToolBar->AddTool(IDM_BROWSE, _T("Browse"), m_Bitmaps[Toolbar_Browse], _T("Browse for an ISO directory...")); diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index 3199b33cdc..c22878156b 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -82,7 +82,7 @@ void TextureCache::Cleanup() while(iter != textures.end()) { - if (frameCount> TEXTURE_KILL_THRESHOLD + iter->second.frameCount) + if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second.frameCount) { if (!iter->second.isRenderTarget) { @@ -106,8 +106,8 @@ void TextureCache::Cleanup() TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, int height, int format, int tlutaddr, int tlutfmt) { - if (address == 0) - return NULL; + if (address == 0) return NULL; + TexCache::iterator iter = textures.find(address); u8 *ptr = g_VideoInitialize.pGetMemoryPointer(address); @@ -116,12 +116,13 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, u32 palhash = 0xc0debabe; if (palSize) { - if (palSize>16) - palSize = 16; //let's not do excessive amount of checking + // TODO: Share this code with the GL plugin. + 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