Constify libinput_config_accel_set_points()

We copy the contents of the double array so let's constify this.

Fixes: 5324f425a1 ("Introduce custom acceleration profile")

Closes #1114

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1195>
This commit is contained in:
Peter Hutterer 2025-04-30 10:32:16 +10:00 committed by Marge Bot
parent fc3868a4de
commit 04975b4618
2 changed files with 6 additions and 2 deletions

View file

@ -4444,7 +4444,9 @@ libinput_device_config_accel_apply(struct libinput_device *device,
LIBINPUT_EXPORT enum libinput_config_status
libinput_config_accel_set_points(struct libinput_config_accel *config,
enum libinput_config_accel_type accel_type,
double step, size_t npoints, double *points)
double step,
size_t npoints,
const double *points)
{
if (config->profile != LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM)
return LIBINPUT_CONFIG_STATUS_INVALID;

View file

@ -5775,7 +5775,9 @@ enum libinput_config_accel_type {
enum libinput_config_status
libinput_config_accel_set_points(struct libinput_config_accel *accel_config,
enum libinput_config_accel_type accel_type,
double step, size_t npoints, double *points);
double step,
size_t npoints,
const double *points);
/**
* @ingroup config