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

Fix button combo check in games like Trine 2 #18

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/function_patcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ void SwapScreens() {
void SwapVoices();
extern "C" uint32_t VPADGetButtonProcMode(VPADChan chan);

static uint32_t sSwapScreenWasHoldForXFrameGamePad;
static uint32_t sSwapVoicesWasHoldForXFrameGamePad;
static uint32_t sSwapScreenWasHoldForXFrameGamePad = 0;
static uint32_t sSwapVoicesWasHoldForXFrameGamePad = 0;
DECL_FUNCTION(int32_t, VPADRead, VPADChan chan, VPADStatus *buffer, uint32_t buffer_size, VPADReadError *error) {
VPADReadError real_error;
int32_t result = real_VPADRead(chan, buffer, buffer_size, &real_error);
Expand All @@ -92,14 +92,14 @@ DECL_FUNCTION(int32_t, VPADRead, VPADChan chan, VPADStatus *buffer, uint32_t buf
bool checkFullBuffer = VPADGetButtonProcMode(chan) == 1;

if (gChangeAudioModeButtonComboEnabled && checkButtonComboVPAD(buffer,
checkFullBuffer ? buffer_size : 1,
checkFullBuffer ? result : 1,
gSwapAudioButtonCombo,
sSwapVoicesWasHoldForXFrameGamePad)) {
SwapVoices();
}

if (gSwapScreenButtonComboEnabled && checkButtonComboVPAD(buffer,
checkFullBuffer ? buffer_size : 1,
checkFullBuffer ? result : 1,
gSwapScreenButtonCombo,
sSwapScreenWasHoldForXFrameGamePad)) {
SwapScreens();
Expand Down
12 changes: 0 additions & 12 deletions src/utils/utils.h

This file was deleted.

Loading