-
-
Notifications
You must be signed in to change notification settings - Fork 269
Add PC-accurate controller vibration with per-container settings #1214
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
Open
TideGear
wants to merge
7
commits into
utkarshdalal:master
Choose a base branch
from
TideGear:Fix-Vibration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5901d4b
feat: PC-accurate per-controller vibration on top of upstream multi-c…
TideGear e043d6e
fix: review fixes + dropped upstream improvements on the vibration path
TideGear 85eab6d
fix: cap evshim's vjoy count to currently-connected controllers
TideGear edf124b
Merge remote-tracking branch 'upstream/master' into Fix-Vibration
TideGear 06906b8
fix: redeploy libevshim.so from APK and restore multi-controller fixe…
TideGear 1fc7318
fix: address two review findings in WinHandler
TideGear ea26c9a
fix: reconcile active rumble on vibration setting change; capture GET…
TideGear File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| /* | ||
| * Minimal SDL2 type stubs for cross-compiling evshim.c with the Android NDK. | ||
| * Only the types, constants, and struct layouts that evshim.c actually uses | ||
| * are defined here. All SDL functions are loaded at runtime via dlsym(). | ||
| * | ||
| * Struct layout must match SDL2 >= 2.24.0 (SDL_VirtualJoystickDesc). | ||
| */ | ||
| #ifndef SDL_STUB_H | ||
| #define SDL_STUB_H | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| typedef uint8_t Uint8; | ||
| typedef uint16_t Uint16; | ||
| typedef uint32_t Uint32; | ||
| typedef int32_t Sint32; | ||
|
|
||
| #define SDLCALL | ||
|
|
||
| #define SDL_INIT_JOYSTICK 0x00000200u | ||
|
|
||
| typedef struct SDL_Joystick SDL_Joystick; | ||
|
|
||
| typedef struct SDL_version { | ||
| Uint8 major; | ||
| Uint8 minor; | ||
| Uint8 patch; | ||
| } SDL_version; | ||
|
|
||
| typedef enum { | ||
| SDL_JOYSTICK_TYPE_UNKNOWN = 0, | ||
| SDL_JOYSTICK_TYPE_GAMECONTROLLER, | ||
| SDL_JOYSTICK_TYPE_WHEEL, | ||
| SDL_JOYSTICK_TYPE_ARCADE_STICK, | ||
| SDL_JOYSTICK_TYPE_FLIGHT_STICK, | ||
| SDL_JOYSTICK_TYPE_DANCE_PAD, | ||
| SDL_JOYSTICK_TYPE_GUITAR, | ||
| SDL_JOYSTICK_TYPE_DRUM_KIT, | ||
| SDL_JOYSTICK_TYPE_ARCADE_PAD, | ||
| SDL_JOYSTICK_TYPE_THROTTLE | ||
| } SDL_JoystickType; | ||
|
|
||
| #define SDL_VIRTUAL_JOYSTICK_DESC_VERSION 1 | ||
|
|
||
| typedef struct SDL_VirtualJoystickDesc { | ||
| Uint16 version; | ||
| Uint16 type; | ||
| Uint16 naxes; | ||
| Uint16 nbuttons; | ||
| Uint16 nhats; | ||
| Uint16 vendor_id; | ||
| Uint16 product_id; | ||
| Uint16 padding; | ||
| Uint32 button_mask; | ||
| Uint32 axis_mask; | ||
| const char *name; | ||
| void *userdata; | ||
| void (SDLCALL *Update)(void *userdata); | ||
| void (SDLCALL *SetPlayerIndex)(void *userdata, int player_index); | ||
| int (SDLCALL *Rumble)(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble); | ||
| int (SDLCALL *RumbleTriggers)(void *userdata, Uint16 left_rumble, Uint16 right_rumble); | ||
| int (SDLCALL *SetLED)(void *userdata, Uint8 red, Uint8 green, Uint8 blue); | ||
| int (SDLCALL *SendEffect)(void *userdata, const void *data, int size); | ||
| } SDL_VirtualJoystickDesc; | ||
|
|
||
| #endif /* SDL_STUB_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.