input: fix scroll-factor resetting if unspecified
This commit is contained in:
parent
5fbf174c36
commit
bd5da261eb
@ -256,7 +256,9 @@ pub const ScrollFactor = struct {
|
|||||||
value: ?f32 = null,
|
value: ?f32 = null,
|
||||||
|
|
||||||
fn apply(scroll_factor: ScrollFactor, device: *InputDevice) void {
|
fn apply(scroll_factor: ScrollFactor, device: *InputDevice) void {
|
||||||
device.config.scroll_factor = scroll_factor.value orelse 1.0;
|
if (scroll_factor.value) |value| {
|
||||||
|
device.config.scroll_factor = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user