Skip to content

Commit

Permalink
cleanup, gamegear support
Browse files Browse the repository at this point in the history
  • Loading branch information
xrip committed Oct 3, 2023
1 parent 5353764 commit 2ab335d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,15 @@ static void handle_input() {
SMS_set_port_a(&sms, JOY1_UP_BUTTON, (nespad_state & DPAD_UP) != 0);
SMS_set_port_a(&sms, JOY1_LEFT_BUTTON, (nespad_state & DPAD_LEFT) != 0);
SMS_set_port_a(&sms, JOY1_RIGHT_BUTTON, (nespad_state & DPAD_RIGHT) != 0);
SMS_set_port_a(&sms, JOY1_A_BUTTON, (nespad_state & DPAD_A) != 0);
SMS_set_port_a(&sms, JOY1_B_BUTTON, (nespad_state & DPAD_B) != 0);
SMS_set_port_b(&sms, RESET_BUTTON, (nespad_state & DPAD_SELECT) != 0);
if (is_gg) {
SMS_set_port_a(&sms, JOY1_A_BUTTON, (nespad_state & DPAD_B) != 0);
SMS_set_port_a(&sms, JOY1_B_BUTTON, (nespad_state & DPAD_A) != 0);
SMS_set_port_b(&sms, PAUSE_BUTTON, (nespad_state & DPAD_START) != 0);
} else {
SMS_set_port_a(&sms, JOY1_A_BUTTON, (nespad_state & DPAD_A) != 0);
SMS_set_port_a(&sms, JOY1_B_BUTTON, (nespad_state & DPAD_B) != 0);

}
}
#define X2(a) (a | (a << 8))
Expand Down

0 comments on commit 2ab335d

Please sign in to comment.