Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clear the texture cache when a new dol is loaded via ES_LAUNCH. Fixes…
… the black screen in The House of the Dead 2.

Abbreviated some of the information in the window titlebar.
  • Loading branch information
skidau committed May 1, 2013
1 parent c2859a5 commit 8bcd9a7
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Source/Core/Core/Src/Core.cpp
Expand Up @@ -680,8 +680,8 @@ void UpdateTitle()
u32 Speed = DrawnVideo * (100 * 1000) / (VideoInterface::TargetRefreshRate * ElapseTime);

// Settings are shown the same for both extended and summary info
std::string SSettings = StringFromFormat("%s %s - %s - %s", cpu_core_base->GetName(), _CoreParameter.bCPUThread ? "DC" : "SC",
g_video_backend->GetName().c_str(), _CoreParameter.bDSPHLE ? "DSPHLE" : "DSPLLE");
std::string SSettings = StringFromFormat("%s %s | %s | %s", cpu_core_base->GetName(), _CoreParameter.bCPUThread ? "DC" : "SC",
g_video_backend->GetName().c_str(), _CoreParameter.bDSPHLE ? "HLE" : "LLE");

// Use extended or summary information. The summary information does not print the ticks data,
// that's more of a debugging interest, it can always be optional of course if someone is interested.
Expand All @@ -698,7 +698,7 @@ void UpdateTitle()

float TicksPercentage = (float)diff / (float)(SystemTimers::GetTicksPerSecond() / 1000000) * 100;

std::string SFPS = StringFromFormat("FPS: %u - VPS: %u - SPEED: %u%%", FPS, VPS, Speed);
std::string SFPS = StringFromFormat("FPS: %u - VPS: %u - %u%%", FPS, VPS, Speed);
SFPS += StringFromFormat(" | CPU: %s%i MHz [Real: %i + IdleSkip: %i] / %i MHz (%s%3.0f%%)",
_CoreParameter.bSkipIdle ? "~" : "",
(int)(diff),
Expand All @@ -711,11 +711,11 @@ void UpdateTitle()
#else // Summary information
std::string SFPS;
if (Movie::IsPlayingInput())
SFPS = StringFromFormat("VI: %u/%u - Frame: %u/%u - FPS: %u - VPS: %u - SPEED: %u%%", (u32)Movie::g_currentFrame, (u32)Movie::g_totalFrames, (u32)Movie::g_currentInputCount, (u32)Movie::g_totalInputCount, FPS, VPS, Speed);
SFPS = StringFromFormat("VI: %u/%u - Frame: %u/%u - FPS: %u - VPS: %u - %u%%", (u32)Movie::g_currentFrame, (u32)Movie::g_totalFrames, (u32)Movie::g_currentInputCount, (u32)Movie::g_totalInputCount, FPS, VPS, Speed);
else if (Movie::IsRecordingInput())
SFPS = StringFromFormat("VI: %u - Frame: %u - FPS: %u - VPS: %u - SPEED: %u%%", (u32)Movie::g_currentFrame, (u32)Movie::g_currentInputCount, FPS, VPS, Speed);
SFPS = StringFromFormat("VI: %u - Frame: %u - FPS: %u - VPS: %u - %u%%", (u32)Movie::g_currentFrame, (u32)Movie::g_currentInputCount, FPS, VPS, Speed);
else
SFPS = StringFromFormat("FPS: %u - VPS: %u - SPEED: %u%%", FPS, VPS, Speed);
SFPS = StringFromFormat("FPS: %u - VPS: %u - %u%%", FPS, VPS, Speed);
#endif

// This is our final "frame counter" string
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/Src/HLE/HLE_Misc.cpp
Expand Up @@ -20,6 +20,7 @@
#include "PowerPC/SignatureDB.h"
#include "PowerPC/PPCSymbolDB.h"
#include "CommonPaths.h"
#include "TextureCacheBase.h"

namespace HLE_Misc
{
Expand Down Expand Up @@ -310,6 +311,7 @@ void ExecuteDOL(u8* dolFile, u32 fileSize)
}

PowerPC::ppcState.iCache.Reset();
TextureCache::Invalidate();

CWII_IPC_HLE_Device_usb_oh1_57e_305* s_Usb = GetUsbPointer();
size_t size = s_Usb->m_WiiMotes.size();
Expand Down
1 change: 1 addition & 0 deletions Source/Plugins/Plugin_VideoDX11/Src/VideoBackend.h
Expand Up @@ -13,6 +13,7 @@ class VideoBackend : public VideoBackendHardware
void Shutdown();

std::string GetName();
std::string GetDisplayName();

void Video_Prepare();
void Video_Cleanup();
Expand Down
5 changes: 5 additions & 0 deletions Source/Plugins/Plugin_VideoDX11/Src/main.cpp
Expand Up @@ -63,6 +63,11 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
}

std::string VideoBackend::GetName()
{
return "DX11";
}

std::string VideoBackend::GetDisplayName()
{
return "Direct3D11";
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Plugins/Plugin_VideoDX9/Src/main.cpp
Expand Up @@ -72,7 +72,7 @@ void VideoBackend::UpdateFPSDisplay(const char *text)

std::string VideoBackend::GetName()
{
return "Direct3D9";
return "DX9";
}

std::string VideoBackend::GetDisplayName()
Expand Down
1 change: 1 addition & 0 deletions Source/Plugins/Plugin_VideoOGL/Src/VideoBackend.h
Expand Up @@ -13,6 +13,7 @@ class VideoBackend : public VideoBackendHardware
void Shutdown();

std::string GetName();
std::string GetDisplayName();

void Video_Prepare();
void Video_Cleanup();
Expand Down
5 changes: 5 additions & 0 deletions Source/Plugins/Plugin_VideoOGL/Src/main.cpp
Expand Up @@ -91,6 +91,11 @@ namespace OGL
{

std::string VideoBackend::GetName()
{
return "OGL";
}

std::string VideoBackend::GetDisplayName()
{
return "OpenGL";
}
Expand Down

0 comments on commit 8bcd9a7

Please sign in to comment.