0

Gamepad support by emutavchi · Pull Request #52 · WebPlatformForEmbedded/WPEBac...

 2 years ago
source link: https://github.com/WebPlatformForEmbedded/WPEBackend-rdk/pull/52
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Contributor

@emutavchi emutavchi commented on Sep 6, 2020

No description provided.

All reactions

Contributor

aperezdc commented on Oct 15, 2020

We have support in the WebKit GTK port to use libmanette for gamepad support, which would already cover some of the TODOs that you have in the code here (like per gamepad mappings, and user-provided custom mappings, too). Most of the code here is basically reimplementing part of libmanette. Wouldn't it make more sense to enable WebKit's support to use libmanette directly? That would avoid needing this patch, and also WebPlatformForEmbedded/libwpe#69 would not be unneeded.

Contributor

Author

emutavchi commented on Oct 27, 2020

@aperezdc thank you for looking into this. I'll check if we can use libmanette and get back to you. I'd like to keep this pull request open in the meantime if that is ok. Thanks!

Contributor

aperezdc commented on Oct 27, 2020

@aperezdc thank you for looking into this. I'll check if we can use libmanette and get back to you. I'd like to keep this pull request open in the meantime if that is ok. Thanks!

@emutavchi: No problem at all, we can keep this PR open for now.

Something that I was mulling over this weekend is that with the approach of having an interface in libwpe we can let embedders decide which web view gets the gamepad events directly (by means of their wpe_view_backend), but using the libmanette code in WebKit we would need to provide something in the API anyway to configure which view gets the gamepad events. This might be one point in favor of the libwpe interface. Maybe @zdobersek has some thoughts in this regard.

@emutavchi: Note that even if we end up adding the gamepad interface in libwpe, you might still want to use libmanette in WPEBackend-rdk so you can avoid writing most of the code that actually handles detecting devices, reading input events, remapping buttons (as it includes a mapper), and providing default mappings for many gamepads (libmanette includes a copy of SDL's button mappings database, which seems to be a de facto standard).

Contributor

woutermeek commented on Dec 17, 2020

@emutavchi do we need to keep this PR open?

Contributor

Author

emutavchi commented on Dec 22, 2020

Hi, @woutermeek @aperezdc. sorry for the delayed response.

@aperezdc, unfortunately, we cannot use libmanette at the moment due to dependency on the Meson build system. We're in the process of moving to the latest Yocto version. Migration of all devices will take some time. Until then I think it'd be good to have a simple, dependency less implementation.

I'll prepare pull request for wpe-webkit repo showing the usage of the new API and update with the link to PR here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

No one assigned

Labels
None yet
Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

None yet

3 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK