Skip to content

Commit

Permalink
Allow Start controller button to be used to press on menu buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamyCecil committed Sep 14, 2024
1 parent d3e0c59 commit 5466b8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SeriousSam/GUI/Menus/Menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct PressedMenuButton {
// Apply / Enter the next menu
inline bool Apply(void) {
return iKey == SE1K_RETURN || iMouse == SDL_BUTTON_LEFT
|| iCtrl == SDL_CONTROLLER_BUTTON_A;
|| iCtrl == SDL_CONTROLLER_BUTTON_A || iCtrl == SDL_CONTROLLER_BUTTON_START;
};

// Decrease value
Expand Down
4 changes: 3 additions & 1 deletion Sources/SeriousSam/SeriousSam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,9 @@ int SubMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, const CTString &strCm
// If currently in the menu and wanting to return to the previous menu
} else if (bMenuForced && bMenuToggle && pgmCurrentMenu->gm_pgmParentMenu == NULL) {
// Delete key down message because there's no previous menu
event.type = WM_NULL;
if (event.type != WM_CTRLBUTTONDOWN) {
event.type = WM_NULL;
}
}

// Quick-open specific menus
Expand Down

0 comments on commit 5466b8b

Please sign in to comment.