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 quick toggle emulation #20

Merged
merged 13 commits into from
Jun 26, 2024
Prev Previous commit
Next Next commit
fix syntax errors
i may be stupid
jadeiseepy authored Jun 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 68be80a70dbd263de40e7267382dc4598d07cacb
3 changes: 1 addition & 2 deletions plugin/source/quick_select.cpp
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ static void cycleQuickSelect()
static void toggleEmulation()
{
NfpiiEmulationState state = NfpiiGetEmulationState();
std::string notifText;
if (state == NFPII_EMULATION_ON) {
NfpiiSetEmulationState(NFPII_EMULATION_OFF);
std::string notifText = "re_nfpii: Disabled emulation";
jadeiseepy marked this conversation as resolved.
Show resolved Hide resolved
@@ -129,8 +130,6 @@ DECL_FUNCTION(void, WPADRead, WPADChan chan, WPADStatusProController* data)
cycleQuickSelect();
}
sWasHoldForXFrame[chan]++;
} else {
sWasHoldForXFrame[chan] = 0;
} else if ((currentQuickRemoveCombination != 0 && (curButtonHold & currentQuickRemoveCombination) == currentQuickRemoveCombination)) {
if (sWasHoldForXFrame[chan] == 0) {
toggleEmulation();