Skip to content

Commit e50a855

Browse files
committed
fix: add version check to libcamera_parse_point
Signed-off-by: Patrick Gehrsitz <[email protected]>
1 parent e2caf5b commit e50a855

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

device/libcamera/options.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ static libcamera::Size libcamera_parse_size(const char *value)
359359
return libcamera::Size();
360360
}
361361

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

380381
return libcamera::Point();
381382
}
383+
#endif
382384

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

0 commit comments

Comments
 (0)