Skip to content

Commit 7080c7d

Browse files
authored
Fix value type for getting frame limit control (#13)
* Fix value type from enum to int32 * Add docs
1 parent b71a365 commit 7080c7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/device_adapter.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ impl DeviceAdapter {
152152

153153
/// Attempt to query the frame rate limit driver setting.
154154
/// Falls back to a higher scope if the setting could not be found in the current one.
155+
///
156+
/// Returned value is the current or most-recent configured frame limit,
157+
/// seemingly regardless of whether the feature is enabled.
155158
pub fn feature_frame_limit(&self, scope: DriverSettingScope<'_>) -> Result<i32> {
156159
let mut result = ctl_result_t::CTL_RESULT_ERROR_UNKNOWN;
157160
let mut scope = Some(scope);
@@ -167,7 +170,7 @@ impl DeviceAdapter {
167170
ApplicationName: current_app.as_mut_ptr() as *mut _,
168171
ApplicationNameLength: current_app.as_bytes().len() as i8,
169172
bSet: false,
170-
ValueType: ctl_property_value_type_t::CTL_PROPERTY_VALUE_TYPE_ENUM,
173+
ValueType: ctl_property_value_type_t::CTL_PROPERTY_VALUE_TYPE_INT32,
171174
Value: unsafe { std::mem::zeroed() },
172175
CustomValueSize: 0,
173176
pCustomValue: std::ptr::null_mut(),

0 commit comments

Comments
 (0)