[IDEA] Fix recording when using `speedup/turbo`.
We do not allow to skip frames while recording. The resulting length will be extended compared to using turbo/speedup modes, because the recording will be normal time (as in running without turbo/speedup).
This commit is contained in:
parent
738494a232
commit
f5b19475c9
|
@ -5150,8 +5150,8 @@ void gbEmulate(int ticksToStop)
|
||||||
gbDrawLine();
|
gbDrawLine();
|
||||||
} else if ((register_LY == 144) && (!systemFrameSkip)) {
|
} else if ((register_LY == 144) && (!systemFrameSkip)) {
|
||||||
int framesToSkip = systemFrameSkip;
|
int framesToSkip = systemFrameSkip;
|
||||||
if (speedup)
|
//if (speedup)
|
||||||
framesToSkip = 9; // try 6 FPS during speedup
|
// framesToSkip = 9; // try 6 FPS during speedup
|
||||||
if ((gbFrameSkipCount >= framesToSkip) || (gbWhiteScreen == 1)) {
|
if ((gbFrameSkipCount >= framesToSkip) || (gbWhiteScreen == 1)) {
|
||||||
gbWhiteScreen = 2;
|
gbWhiteScreen = 2;
|
||||||
|
|
||||||
|
|
|
@ -2336,10 +2336,15 @@ static const wxString media_err(recording::MediaRet ret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int save_speedup_frame_skip;
|
||||||
|
|
||||||
void GameArea::StartVidRecording(const wxString& fname)
|
void GameArea::StartVidRecording(const wxString& fname)
|
||||||
{
|
{
|
||||||
recording::MediaRet ret;
|
recording::MediaRet ret;
|
||||||
|
|
||||||
|
// do not skip frames when recording
|
||||||
|
save_speedup_frame_skip = speedup_frame_skip;
|
||||||
|
speedup_frame_skip = 0;
|
||||||
vid_rec.SetSampleRate(soundGetSampleRate());
|
vid_rec.SetSampleRate(soundGetSampleRate());
|
||||||
if ((ret = vid_rec.Record(fname.mb_str(), basic_width, basic_height,
|
if ((ret = vid_rec.Record(fname.mb_str(), basic_width, basic_height,
|
||||||
systemColorDepth))
|
systemColorDepth))
|
||||||
|
@ -2357,6 +2362,8 @@ void GameArea::StartVidRecording(const wxString& fname)
|
||||||
void GameArea::StopVidRecording()
|
void GameArea::StopVidRecording()
|
||||||
{
|
{
|
||||||
vid_rec.Stop();
|
vid_rec.Stop();
|
||||||
|
// allow to skip frames again
|
||||||
|
speedup_frame_skip = save_speedup_frame_skip;
|
||||||
MainFrame* mf = wxGetApp().frame;
|
MainFrame* mf = wxGetApp().frame;
|
||||||
mf->cmd_enable &= ~CMDEN_VREC;
|
mf->cmd_enable &= ~CMDEN_VREC;
|
||||||
mf->cmd_enable |= CMDEN_NVREC;
|
mf->cmd_enable |= CMDEN_NVREC;
|
||||||
|
|
Loading…
Reference in New Issue