Added a frame counter while recording or playing back a TAS movie. Forced the GC/Wii to poll from the inputs at regular intervals. Disabled frame skip in record/playback mode. This helps the emulator to be determinate.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7128 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8e91183897
commit
22553bd625
|
@ -530,7 +530,7 @@ void VideoThrottle()
|
|||
|
||||
// Update info per second
|
||||
u32 ElapseTime = (u32)Timer.GetTimeDifference();
|
||||
if (ElapseTime >= 1000 && DrawnVideo > 0)
|
||||
if ((ElapseTime >= 1000 && DrawnVideo > 0) || Frame::g_bFrameStep)
|
||||
{
|
||||
SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
|
@ -567,7 +567,11 @@ void VideoThrottle()
|
|||
TicksPercentage);
|
||||
|
||||
#else // Summary information
|
||||
std::string SFPS = StringFromFormat("FPS: %u - VPS: %u - SPEED: %u%%", FPS, VPS, Speed);
|
||||
std::string SFPS;
|
||||
if (Frame::g_recordfd)
|
||||
SFPS = StringFromFormat("Frame: %d | FPS: %u - VPS: %u - SPEED: %u%%", Frame::g_frameCounter, FPS, VPS, Speed);
|
||||
else
|
||||
SFPS = StringFromFormat("FPS: %u - VPS: %u - SPEED: %u%%", FPS, VPS, Speed);
|
||||
#endif
|
||||
|
||||
// This is our final "frame counter" string
|
||||
|
|
|
@ -621,6 +621,12 @@ void RunSIBuffer()
|
|||
|
||||
int GetTicksToNextSIPoll()
|
||||
{
|
||||
// Poll for input at regular intervals (once per frame) when playing or recording a movie
|
||||
if (Frame::IsPlayingInput() || Frame::IsRecordingInput())
|
||||
{
|
||||
return SystemTimers::GetTicksPerSecond() / VideoInterface::TargetRefreshRate;
|
||||
}
|
||||
|
||||
if (!g_Poll.Y && g_Poll.X)
|
||||
return VideoInterface::GetTicksPerLine() * g_Poll.X;
|
||||
else if (!g_Poll.Y)
|
||||
|
|
|
@ -102,6 +102,9 @@ void SetFrameStopping(bool bEnabled)
|
|||
}
|
||||
|
||||
void FrameSkipping()
|
||||
{
|
||||
// Frameskipping will desync movie playback
|
||||
if (!IsPlayingInput() && !IsRecordingInput())
|
||||
{
|
||||
cs_frameSkip.Enter();
|
||||
|
||||
|
@ -113,6 +116,7 @@ void FrameSkipping()
|
|||
|
||||
cs_frameSkip.Leave();
|
||||
}
|
||||
}
|
||||
|
||||
bool IsRecordingInput()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue