Skip to content

Commit

Permalink
more bad code
Browse files Browse the repository at this point in the history
  • Loading branch information
fishrockz committed Dec 20, 2024
1 parent 5ecd2ca commit 7d9a3d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libcamera-sys/c_api/controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enum libcamera_control_type {
LIBCAMERA_CONTROL_TYPE_STRING,
LIBCAMERA_CONTROL_TYPE_RECTANGLE,
LIBCAMERA_CONTROL_TYPE_SIZE,
LIBCAMERA_CONTROL_TYPE_POINT,
};

// --- libcamera_control_id ---
Expand Down
2 changes: 2 additions & 0 deletions libcamera/src/control_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ impl ControlValue {
ControlValue::String(v) => (v.as_ptr().cast(), v.len()),
ControlValue::Rectangle(v) => (v.as_ptr().cast(), v.len()),
ControlValue::Size(v) => (v.as_ptr().cast(), v.len()),
ControlValue::Point(v) => (v.as_ptr().cast(), v.len()),
};

let ty = self.ty();
Expand All @@ -289,6 +290,7 @@ impl ControlValue {
ControlValue::String(_) => LIBCAMERA_CONTROL_TYPE_STRING,
ControlValue::Rectangle(_) => LIBCAMERA_CONTROL_TYPE_RECTANGLE,
ControlValue::Size(_) => LIBCAMERA_CONTROL_TYPE_SIZE,
ControlValue::Point(_) => LIBCAMERA_CONTROL_TYPE_POINT,
}
}
}

0 comments on commit 7d9a3d7

Please sign in to comment.