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

Win32: Add Rumble Support #1315

Merged
merged 13 commits into from
Nov 6, 2023
Merged

Win32: Add Rumble Support #1315

merged 13 commits into from
Nov 6, 2023

Conversation

Zer0xFF
Copy link
Contributor

@Zer0xFF Zer0xFF commented Oct 31, 2023

Requries: jpd002/Play--Framework#41

Add basic Rumble/Vibration Support.

Just to note,

  1. I've added few virtual functions, all of them are non-pure (aka they have a stub implementation),
    this will allow all platforms to compile, until we add support for the reset (there is also some derviative class that wont support those calls, aka QtProvider (aka keyboard) will never need to implement them)
  2. CMotorBinding isn't a deriviate of CBinding (as the name might suggest)
  3. can't test DirectInput support (I dont have any device that currently support it)

@Zer0xFF Zer0xFF force-pushed the rumble branch 3 times, most recently from de6e4ab to 3ba4ae0 Compare October 31, 2023 18:16
@Zer0xFF Zer0xFF force-pushed the rumble branch 2 times, most recently from 2f7c52e to 69959d6 Compare October 31, 2023 19:55
@@ -2,7 +2,8 @@

void CPH_GenericInput::Update(uint8* ram)
{
for(auto* listener : m_listeners)
std::map<unsigned int, std::pair<uint8, uint8>> vibrationMap;
Copy link
Owner

Choose a reason for hiding this comment

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

std::map is probably a bit overkill for this. We should use std::array<std::pair<uint8, uint8>, MAX_PADS>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, I've also added code to choose max value, just incase we implement vibration, in the other interfaces

Zer0xFF and others added 3 commits November 3, 2023 14:21
@jpd002 jpd002 merged commit f1c5006 into jpd002:master Nov 6, 2023
13 checks passed
@jpd002
Copy link
Owner

jpd002 commented Nov 6, 2023

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants