diff options
-rw-r--r-- | src/libcamera/v4l2_subdevice.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp index d7b61ba0..87377762 100644 --- a/src/libcamera/v4l2_subdevice.cpp +++ b/src/libcamera/v4l2_subdevice.cpp @@ -258,8 +258,8 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target, sel.target = target; sel.flags = 0; - sel.r.left = rect->y; - sel.r.top = rect->x; + sel.r.left = rect->x; + sel.r.top = rect->y; sel.r.width = rect->w; sel.r.height = rect->h; @@ -272,6 +272,11 @@ int V4L2Subdevice::setSelection(unsigned int pad, unsigned int target, return ret; } + rect->x = sel.r.left; + rect->y = sel.r.top; + rect->w = sel.r.width; + rect->h = sel.r.height; + return 0; } |