GNOME Bugzilla – Bug 682204
Add the gamepads plugin
Last modified: 2019-03-20 11:02:51 UTC
A gamepads plugin for the GNOME Settings Daemon was part of my GSoC 2012 project. https://live.gnome.org/SummerOfCode2012/Projects/ZanDobersek_Gamepad_API Its task is to update the supported gamepads (and/or joysticks) devices list and apply properly working buttons and axes mappings to any supported device when it is connected. The device is also updated with any previous calibration data. The plugin exposes a set of DBus methods that the GNOME Control Center uses to query device support status and calibration data as well as set the new calibration data when the user performs the calibration. Any performed calibration is also saved via GSettings and applied to that device when it's connected. The device list is written in JSON and currently stored in an external repository at GitHub[1] but should probably be merged into GSD repository. Because of that the plugin uses libsoup to gather the data and JsonGlib to parse the JSON.
Created attachment 221754 [details] [review] Patch This is the current patch, generated by diffing the master branch of the gnome-settings-daemon repository at git.gnome.org and the master branch of my GitHub fork[1]. [1] https://github.com/zdobersek/gsd-gamepads-plugin
(In reply to comment #0) > The device list is written in JSON and currently stored in an external > repository at GitHub[1] but should probably be merged into GSD repository. Here's that repository: https://github.com/zdobersek/gamepads-json
A quick review from the description: (In reply to comment #0) > Its task is to update the supported gamepads (and/or joysticks) devices list > and apply properly working buttons and axes mappings to any supported device > when it is connected. OK. > The device is also updated with any previous calibration data. The plugin > exposes a set of DBus methods that the GNOME Control Center uses to query > device support status and calibration data as well as set the new calibration > data when the user performs the calibration. Any performed calibration is also > saved via GSettings and applied to that device when it's connected. Why can't the gnome-control-center share code with gnome-settings-daemon (through a library or cut'n'paste code) to know how to read and write the settings itself? That way, the only thing that the gnome-settings-daemon plugin has to do is look for new pads, and apply the settings, or re-apply the settings when they change. No need to add another D-Bus API for this. > The device list is written in JSON and currently stored in an external > repository at GitHub[1] but should probably be merged into GSD repository. > Because of that the plugin uses libsoup to gather the data and JsonGlib to > parse the JSON. Using libsoup to auto-update the file is out of the question, you can remove that code from the g-s-d plugin straight away.
Putting on NEEDINFO until bug 682205 is sorted.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/187.