From 5cf2c821f6d21f9a95746cb2c939cc226cb79e82 Mon Sep 17 00:00:00 2001 From: Jaex Date: Tue, 18 Apr 2017 11:36:49 +0300 Subject: [PATCH] fixed #2437: Allow animated gif recording using normal screen recording hotkey --- ShareX/ScreenRecordManager.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ShareX/ScreenRecordManager.cs b/ShareX/ScreenRecordManager.cs index 0c3263542..248b6ed24 100644 --- a/ShareX/ScreenRecordManager.cs +++ b/ShareX/ScreenRecordManager.cs @@ -73,21 +73,22 @@ private static void StopRecording() private static void StartRecording(ScreenRecordOutput outputType, TaskSettings taskSettings, ScreenRecordStartMethod startMethod = ScreenRecordStartMethod.Region) { - string debugText; + if (outputType == ScreenRecordOutput.FFmpeg && taskSettings.CaptureSettings.FFmpegOptions.VideoCodec == FFmpegVideoCodec.gif) + { + outputType = ScreenRecordOutput.GIF; + } if (outputType == ScreenRecordOutput.FFmpeg) { - debugText = string.Format("Starting FFmpeg recording. Video encoder: \"{0}\", Audio encoder: \"{1}\", FPS: {2}", + DebugHelper.WriteLine("Starting screen recording. Video encoder: \"{0}\", Audio encoder: \"{1}\", FPS: {2}", taskSettings.CaptureSettings.FFmpegOptions.VideoCodec.GetDescription(), taskSettings.CaptureSettings.FFmpegOptions.AudioCodec.GetDescription(), taskSettings.CaptureSettings.ScreenRecordFPS); } else { - debugText = string.Format("Starting Animated GIF recording. FPS: {0}", taskSettings.CaptureSettings.GIFFPS); + DebugHelper.WriteLine("Starting screen recording. FPS: {0}", taskSettings.CaptureSettings.GIFFPS); } - DebugHelper.WriteLine(debugText); - if (taskSettings.CaptureSettings.RunScreencastCLI) { if (!Program.Settings.VideoEncoders.IsValidIndex(taskSettings.CaptureSettings.VideoEncoderSelected))