summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2016-03-03 10:38:36 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2016-03-03 10:38:36 -0500
commite60f0b3cf0731f38d2699647ea3d42e0016ce980 (patch)
tree4f13b67047d8c1c220aacaf4e17219e7758c2fed /Source
parent46b5b0788303c8603c25213cc29e70e0dcb20ee7 (diff)
parentd39d193c0f1dad873f2308c059f93702d350b8d9 (diff)
Merge pull request #3551 from RisingFog/videodump_proper_delay
Properly Handle Video Dumping from Power On
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/VideoCommon/AVIDump.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp
index d31900afe8..aa6cb9ecbb 100644
--- a/Source/Core/VideoCommon/AVIDump.cpp
+++ b/Source/Core/VideoCommon/AVIDump.cpp
@@ -21,6 +21,7 @@ extern "C" {
#include "Core/ConfigManager.h"
#include "Core/CoreTiming.h"
+#include "Core/Movie.h"
#include "Core/HW/SystemTimers.h"
#include "Core/HW/VideoInterface.h" //for TargetRefreshRate
#include "VideoCommon/AVIDump.h"
@@ -177,7 +178,9 @@ void AVIDump::AddFrame(const u8* data, int width, int height)
int error = 0;
u64 delta;
s64 last_pts;
- if (!s_start_dumping && s_last_frame <= SystemTimers::GetTicksPerSecond())
+ // Check to see if the first frame being dumped is the first frame of output from the emulator.
+ // This prevents an issue with starting dumping later in emulation from placing the frames incorrectly.
+ if (!s_start_dumping && Movie::g_currentFrame < 1)
{
delta = CoreTiming::GetTicks();
last_pts = AV_NOPTS_VALUE;