Fixed active window screen recording file naming

This commit is contained in:
Jaex 2024-05-02 06:38:11 +03:00
parent 34b23fcd37
commit 47bc35bf99
1 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,7 @@ namespace ShareX
else
{
RegionCaptureTasks.GetRectangleRegion(out captureRectangle, out WindowInfo windowInfo, taskSettings.CaptureSettings.SurfaceOptions);
metadata.UpdateInfo(windowInfo);
}
break;
@ -149,6 +150,10 @@ namespace ShareX
{
captureRectangle = CaptureHelpers.GetActiveWindowRectangle();
}
IntPtr handle = NativeMethods.GetForegroundWindow();
WindowInfo activeWindowInfo = new WindowInfo(handle);
metadata.UpdateInfo(activeWindowInfo);
break;
case ScreenRecordStartMethod.CustomRegion:
captureRectangle = taskSettings.CaptureSettings.CaptureCustomRegion;