From 491ba50a915f00584c6913125dab23d05fea3376 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Thu, 25 Jul 2024 18:53:55 -0700 Subject: [PATCH] More warning fixes --- .../src/Test/Sandwich/WebDriver/Internal/Video.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Video.hs b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Video.hs index dfd0ec00..ed534239 100644 --- a/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Video.hs +++ b/sandwich-webdriver/src/Test/Sandwich/WebDriver/Internal/Video.hs @@ -5,7 +5,6 @@ module Test.Sandwich.WebDriver.Internal.Video where import Control.Monad.IO.Unlift import Control.Monad.Logger import Control.Monad.Reader -import Data.Function ((&)) import Data.String.Interpolate import System.Process import Test.Sandwich @@ -21,6 +20,7 @@ getMacScreenNumber = return $ Just 0 -- TODO #endif #ifdef linux_HOST_OS +import Data.Function ((&), on) import qualified Data.List as L import Data.Maybe import UnliftIO.Environment @@ -81,7 +81,11 @@ getVideoArgs path (width, height, x, y) (VideoSettings {..}) maybeXvfbSession = let videoPath = [i|#{path}.mkv|] let cmd = ["-f", "gdigrab" , "-nostdin" - , "-i", "desktop"] + , "-i", "desktop" + , "-offset_x", [i|#{x}|] + , "-offset_y", [i|#{y}|] + , "-video-size", [i|#{width}x#{height}|] + ] ++ gdigrabOptions ++ [videoPath] return ((proc ffmpeg cmd) { env = Nothing })