Skip to content

Commit

Permalink
fix: add version check to libcamera_parse_point
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Gehrsitz <[email protected]>
  • Loading branch information
mryel00 committed Nov 30, 2024
1 parent e2caf5b commit e50a855
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions device/libcamera/options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ static libcamera::Size libcamera_parse_size(const char *value)
return libcamera::Size();
}

#if LIBCAMERA_VERSION_MAJOR == 0 && LIBCAMERA_VERSION_MINOR > 3 && LIBCAMERA_VERSION_PATCH >= 2 // Support for older libcamera versions
static libcamera::Point libcamera_parse_point(const char *value)
{
static const char *POINT_PATTERNS[] =
Expand All @@ -379,6 +380,7 @@ static libcamera::Point libcamera_parse_point(const char *value)

return libcamera::Point();
}
#endif

template<typename T, typename F>
static bool libcamera_parse_control_value(libcamera::ControlValue &control_value, const char *value, const F &fn)
Expand Down

0 comments on commit e50a855

Please sign in to comment.