Skip to content

Commit 156bb67

Browse files
committed
GIF recording: We can now pass a bool argument to skip the countdown. See #360.
1 parent 4bbf32e commit 156bb67

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

TheForceEngine/TFE_RenderBackend/Win32OpenGL/renderBackend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ namespace TFE_RenderBackend
307307
s_screenshotQueued = true;
308308
}
309309

310-
void startGifRecording(const char* path)
310+
void startGifRecording(const char* path, bool skipCountdown)
311311
{
312-
s_screenCapture->beginRecording(path);
312+
s_screenCapture->beginRecording(path, skipCountdown);
313313
}
314314

315315
void stopGifRecording()

TheForceEngine/TFE_RenderBackend/Win32OpenGL/screenCapture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ void ScreenCapture::captureFrame(const char* outputPath)
218218
m_writeBuffer = (m_writeBuffer + 1) % m_bufferCount;
219219
}
220220

221-
void ScreenCapture::beginRecording(const char* path)
221+
void ScreenCapture::beginRecording(const char* path, bool skipCountdown)
222222
{
223223
m_capturePath = string(path);
224-
if (TFE_Settings::getSystemSettings()->showGifRecordingCountdown)
224+
if (!skipCountdown && TFE_Settings::getSystemSettings()->showGifRecordingCountdown)
225225
{
226226
startCountdown();
227227
}

TheForceEngine/TFE_RenderBackend/Win32OpenGL/screenCapture.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ScreenCapture
3939

4040
void captureFrontBufferToMemory(u32* mem);
4141

42-
void beginRecording(const char* path);
42+
void beginRecording(const char* path, bool skipCountdown);
4343
void endRecording();
4444

4545
ScreenCaptureState getState();

TheForceEngine/TFE_RenderBackend/renderBackend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ namespace TFE_RenderBackend
9898
void setClearColor(const f32* color);
9999
void swap(bool blitVirtualDisplay);
100100
void queueScreenshot(const char* screenshotPath);
101-
void startGifRecording(const char* path);
101+
void startGifRecording(const char* path, bool skipCountdown = false);
102102
void stopGifRecording();
103103
void captureScreenToMemory(u32* mem);
104104

0 commit comments

Comments
 (0)