input mouse: Fix use default values for non available touchpad settings

+ license update

This fixes loading old versions of touchpad settings files by
providing default values for missing setting entries.

Change-Id: Ib655bcc439e28efc57388602e4aee35868a35028
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9906
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Samuel Rodríguez Pérez
2025-11-29 19:36:51 +00:00
committed by Adrien Destugues
parent 5cc2a47ef1
commit 0ab44682c9
@@ -1,5 +1,5 @@
/* /*
* Copyright 2004-2011, Haiku. * Copyright 2004-2025, Haiku.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -8,6 +8,7 @@
* Axel Dörfler, [email protected] * Axel Dörfler, [email protected]
* Clemens Zeidler, [email protected] * Clemens Zeidler, [email protected]
* Stephan Aßmus, [email protected] * Stephan Aßmus, [email protected]
* Samuel Rodríguez Pérez, [email protected]
*/ */
@@ -616,6 +617,8 @@ status_t
MouseDevice::_UpdateTouchpadSettings(BMessage* message) MouseDevice::_UpdateTouchpadSettings(BMessage* message)
{ {
touchpad_settings settings; touchpad_settings settings;
settings = kDefaultTouchpadSettings;
message->FindBool("scroll_reverse", &settings.scroll_reverse); message->FindBool("scroll_reverse", &settings.scroll_reverse);
message->FindBool("scroll_twofinger", &settings.scroll_twofinger); message->FindBool("scroll_twofinger", &settings.scroll_twofinger);
message->FindBool("scroll_twofinger_horizontal", message->FindBool("scroll_twofinger_horizontal",