Skip to content

Commit

Permalink
Apply suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
meithecatte committed Jan 28, 2024
1 parent 2a325ba commit e4edaa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/core_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include "struct_decls/struct_0201CD88_decl.h"
#include "overlay023/funcptr_ov23_022537D4.h"

typedef enum ButtonMode {
enum ButtonMode {
BUTTON_MODE_NORMAL = 0,
BUTTON_MODE_START_IS_X = 1,
BUTTON_MODE_SWAP_XY = 2,
BUTTON_MODE_L_IS_A = 3,
} ButtonMode;
};

typedef struct CoreSys {
UnkFuncPtr_02017798 unk_00;
Expand All @@ -26,7 +26,7 @@ typedef struct CoreSys {
u32 * unk_28;
u32 unk_2C;
u32 unk_30;
ButtonMode buttonMode;
enum ButtonMode buttonMode;
u32 heldKeysRaw;
u32 pressedKeysRaw;
u32 pressedKeysRepeatableRaw;
Expand Down
4 changes: 3 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#include "unk_02039A64.h"
#include "unk_0209A74C.h"

#define RESET_COMBO (PAD_BUTTON_START | PAD_BUTTON_SELECT | PAD_BUTTON_L | PAD_BUTTON_R)

FS_EXTERN_OVERLAY(overlay57);
FS_EXTERN_OVERLAY(overlay77);

Expand Down Expand Up @@ -122,7 +124,7 @@ void NitroMain (void)
sub_0200106C();
ReadKeypadAndTouchpad();

if ((gCoreSys.heldKeysRaw & (PAD_BUTTON_START | PAD_BUTTON_SELECT | PAD_BUTTON_L | PAD_BUTTON_R)) == (PAD_BUTTON_START | PAD_BUTTON_SELECT | PAD_BUTTON_L | PAD_BUTTON_R)) {
if ((gCoreSys.heldKeysRaw & RESET_COMBO) == RESET_COMBO) {
if (gCoreSys.unk_68 == 0) {
sub_02000F60(0);
}
Expand Down

0 comments on commit e4edaa7

Please sign in to comment.