From bd9524431495d94e0984cce6b2999f69d481bd53 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Tue, 2 Aug 2022 23:37:20 -0700 Subject: [PATCH] Added screen resolution to tapsequence --- capture.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/capture.go b/capture.go index 20e7b9c..9a9ca23 100644 --- a/capture.go +++ b/capture.go @@ -154,6 +154,10 @@ func (d Device) ReplayTapSequence(ctx context.Context, t TapSequence) error { // time.Sleep(time.Second * 30) // cancelFunc() func (d Device) CaptureSequence(ctx context.Context) (t TapSequence, err error) { + t.Resolution, err = d.GetScreenResolution(ctx) + if err != nil { + return + } // this command will never finish without ctx expiring. As a result, // it will always return error code 130 if successful stdout, _, errCode, err := execute(ctx, []string{"shell", "getevent", "-tl"})