Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gamepad implementation. #361

Merged
merged 1 commit into from
Aug 23, 2022
Merged

Add gamepad implementation. #361

merged 1 commit into from
Aug 23, 2022

Conversation

ceyusa
Copy link
Member

@ceyusa ceyusa commented Sep 23, 2021

The current implementation is based on libmanette. If libmanette is available a noop implementation is used.

Depends on WebPlatformForEmbedded/libwpe#88

@aperezdc aperezdc added this to the Cog 0.14 milestone Nov 11, 2021
@aperezdc aperezdc added the enhancement New feature or request label Nov 11, 2021
@ceyusa
Copy link
Member Author

ceyusa commented Feb 10, 2022

rebased and implemented method to get the view backend

@ceyusa
Copy link
Member Author

ceyusa commented Apr 19, 2022

sync'ed with latest review of libwpe

@ceyusa ceyusa force-pushed the gamepad branch 4 times, most recently from b44cea4 to 9ef57fc Compare April 26, 2022 11:03
@ceyusa
Copy link
Member Author

ceyusa commented Apr 26, 2022

Downgraded libmanette version to 0.2.4 because is the one used in WebKit SDK, sadly the CI can install 0.2.3, which I cannot test locally easily.

Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First things first, let me say that I think the overall structure of the code looks fine and worked fine for me here. Most of the comments are mostly style related, but please do read through them. I think we could merge an updated version of this PR once those have been addressed.

Thanks for the work on this, and please do let me know if anything is unclear! 🎮

core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Show resolved Hide resolved
@ceyusa ceyusa force-pushed the gamepad branch 3 times, most recently from 06349b2 to 3b75e12 Compare May 2, 2022 16:01
Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost there! Sorry that I am asking for another couple of changes again 😇. This is almost ready to go!

core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
@manuelafm
Copy link
Contributor

Hi @aperezdc and @ceyusa ,

I happened to stumble upon this PR and think that the issues have been addressed or mostly, but it's still pending, so decided to nudge because it looks as if this crept through a crevice but it's basically ready to merge. Sorry if I'm adding noise.

@aperezdc aperezdc modified the milestones: Cog 0.14, Cog 0.16 Jun 29, 2022
@ceyusa ceyusa force-pushed the gamepad branch 3 times, most recently from 8fbb397 to d115341 Compare July 14, 2022 17:53
@ceyusa
Copy link
Member Author

ceyusa commented Jul 14, 2022

Changes:

  • Meson support
  • Support aarch64, where the memory addresses are bigger than the unsigned int store size.

See demo in https://www.youtube.com/watch?v=iXh7GMR6pH8

Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like a few things tweaked before merging, please take a look at the comments.

core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Show resolved Hide resolved
core/cog-gamepad-manette.c Show resolved Hide resolved
core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost ready to merge, I just made a couple of very small change requests. Thanks!

core/cog-gamepad-manette.c Outdated Show resolved Hide resolved
core/cog-gamepad-manette.c Show resolved Hide resolved
core/meson.build Outdated Show resolved Hide resolved
@ceyusa ceyusa force-pushed the gamepad branch 4 times, most recently from e2975e1 to 3501d99 Compare August 23, 2022 13:44
The current implementation is based on libmanette. If libmanette is
not available, a noop implementation is used.
Copy link
Member

@aperezdc aperezdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, let's merge it 👍🏼

@aperezdc aperezdc merged commit 6842fb3 into Igalia:master Aug 23, 2022
@ceyusa ceyusa deleted the gamepad branch August 24, 2022 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants