mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
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
|
// Update info per second
|
||||||
u32 ElapseTime = (u32)Timer.GetTimeDifference();
|
u32 ElapseTime = (u32)Timer.GetTimeDifference();
|
||||||
if (ElapseTime >= 1000 && DrawnVideo > 0)
|
if ((ElapseTime >= 1000 && DrawnVideo > 0) || Frame::g_bFrameStep)
|
||||||
{
|
{
|
||||||
SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||||
|
|
||||||
@ -567,7 +567,11 @@ void VideoThrottle()
|
|||||||
TicksPercentage);
|
TicksPercentage);
|
||||||
|
|
||||||
#else // Summary information
|
#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
|
#endif
|
||||||
|
|
||||||
// This is our final "frame counter" string
|
// This is our final "frame counter" string
|
||||||
|
@ -621,6 +621,12 @@ void RunSIBuffer()
|
|||||||
|
|
||||||
int GetTicksToNextSIPoll()
|
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)
|
if (!g_Poll.Y && g_Poll.X)
|
||||||
return VideoInterface::GetTicksPerLine() * g_Poll.X;
|
return VideoInterface::GetTicksPerLine() * g_Poll.X;
|
||||||
else if (!g_Poll.Y)
|
else if (!g_Poll.Y)
|
||||||
|
@ -103,15 +103,19 @@ void SetFrameStopping(bool bEnabled)
|
|||||||
|
|
||||||
void FrameSkipping()
|
void FrameSkipping()
|
||||||
{
|
{
|
||||||
cs_frameSkip.Enter();
|
// Frameskipping will desync movie playback
|
||||||
|
if (!IsPlayingInput() && !IsRecordingInput())
|
||||||
|
{
|
||||||
|
cs_frameSkip.Enter();
|
||||||
|
|
||||||
g_frameSkipCounter++;
|
g_frameSkipCounter++;
|
||||||
if (g_frameSkipCounter > g_framesToSkip || Core::report_slow(g_frameSkipCounter) == false)
|
if (g_frameSkipCounter > g_framesToSkip || Core::report_slow(g_frameSkipCounter) == false)
|
||||||
g_frameSkipCounter = 0;
|
g_frameSkipCounter = 0;
|
||||||
|
|
||||||
g_video_backend->Video_SetRendering(!g_frameSkipCounter);
|
g_video_backend->Video_SetRendering(!g_frameSkipCounter);
|
||||||
|
|
||||||
cs_frameSkip.Leave();
|
cs_frameSkip.Leave();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsRecordingInput()
|
bool IsRecordingInput()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user