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

Feature: Local Multiplayer Support #1

Merged
merged 4 commits into from
Nov 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Sources/GPGXBridge/GPGXEmulatorBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,22 @@ - (void)runFrameAndProcessVideo:(BOOL)processVideo

#pragma mark - Inputs -

- (void)activateInput:(NSInteger)inputValue value:(double)value
- (void)activateInput:(NSInteger)inputValue value:(double)value at:(NSInteger)playerIndex
{
int player = 0;
input.pad[player * 4] |= inputValue;
input.pad[playerIndex * 4] |= inputValue;
ianclawson marked this conversation as resolved.
Show resolved Hide resolved
}

- (void)deactivateInput:(NSInteger)inputValue
- (void)deactivateInput:(NSInteger)inputValue at:(NSInteger)playerIndex
{
int player = 0;
input.pad[player * 4] &= ~inputValue;
input.pad[playerIndex * 4] &= ~inputValue;
}

- (void)resetInputs
{
int player = 0;
input.pad[player * 4] = 0;
for(int player = 0; player < 2; player++)
ianclawson marked this conversation as resolved.
Show resolved Hide resolved
{
input.pad[player * 4] = 0;
ianclawson marked this conversation as resolved.
Show resolved Hide resolved
}
}

#pragma mark - Game Saves -
Expand Down