Fix screen flickering with frameskip on D3D plugin, also fix occasional hang when turning frameskip off

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4194 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s
2009-09-04 06:09:21 +00:00
parent 08d3dee74c
commit 5a21d72693
13 changed files with 88 additions and 91 deletions

View File

@ -231,7 +231,7 @@ void Stop() // - Hammertime!
}
// Video_EnterLoop() should now exit so that EmuThread() will continue concurrently with the rest
// of the commands in this function. We no longer rely on Postmessage. */
// of the commands in this function. We no longer rely on Postmessage.
// Close the trace file
Core::StopTrace();
@ -698,7 +698,7 @@ void Callback_VideoCopiedToXFB(bool video_update)
int TargetVPS = (int)(VideoInterface::TargetRefreshRate + 0.5);
float Speed = (VPS / TargetVPS) * 100.0f;
float Speed = ((VPS > 0 ? VPS : VideoInterface::ActualRefreshRate) / TargetVPS) * 100.0f;
// Settings are shown the same for both extended and summary info
std::string SSettings = StringFromFormat(" | Core: %s %s",

View File

@ -77,6 +77,11 @@ void SetFrameSkipping(unsigned int framesToSkip) {
g_framesToSkip = (int)framesToSkip;
g_frameSkipCounter = 0;
// Don't forget to re-enable rendering in case it wasn't...
// as this won't be changed anymore when frameskip is turned off
if (framesToSkip == 0)
CPluginManager::GetInstance().GetVideo()->Video_SetRendering(true);
cs_frameSkip.Leave();
}