mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
pointer.c: refactor device configuration
This commit is contained in:
parent
c5a2014a2f
commit
0cdd7fac02
3 changed files with 33 additions and 15 deletions
|
|
@ -266,3 +266,15 @@ struct output_config *example_config_get_output(struct example_config *config,
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct device_config *example_config_get_device(struct example_config *config,
|
||||
struct wlr_input_device *device) {
|
||||
struct device_config *d_config;
|
||||
wl_list_for_each(d_config, &config->devices, link) {
|
||||
if (strcmp(d_config->name, device->name) == 0) {
|
||||
return d_config;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue