From c5e5abea52dcdf7a9068fc9f0f6ae5e49a6f65fd Mon Sep 17 00:00:00 2001 From: James Dansereau <106631954+jkdansereau@users.noreply.github.com> Date: Sun, 13 Sep 2026 17:16:07 -0400 Subject: [PATCH] review pass: shoulder edge-state in menus; release-notes asset names Two defects found in the local review of the unpushed v0.2.0-pre work: 1. input.c: padShoulderPrev was only updated outside menu mode, so a shoulder held across the menu->game transition fired a spurious weapon cycle on the first gameplay poll. Edge state is now tracked every poll; emission stays suppressed in menus where A means select. 2. ci.yml release job: the notes template substitutes with the raw tag (v0.2.0-pre), but bundle-{linux,win}.sh strip the leading v when building asset names -- the published notes would have linked goldeneye-pc-port-v0.2.0-pre-* assets that don't exist. Substitute the stripped form (NOTES_VERSION) instead. --- .github/workflows/ci.yml | 7 ++++++- port/src/input.c | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c0a479..c5e85ab5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -365,7 +365,12 @@ jobs: gh release upload "$TAG" "${ASSETS[@]}" --clobber else NOTES="$(mktemp)" - sed "s//${TAG}/g" .github/release-notes.md > "$NOTES" + # Asset names are built from the tag with the leading v stripped + # (bundle-{linux,win}.sh), so substitute the same form -- a raw + # TAG would make the notes reference goldeneye-pc-port-v*.* assets + # that don't exist. + NOTES_VERSION="${TAG#v}" + sed "s//${NOTES_VERSION}/g" .github/release-notes.md > "$NOTES" gh release create "$TAG" "${ASSETS[@]}" \ --draft --prerelease \ --title "GoldenEye 007 PC Port $TAG" \ diff --git a/port/src/input.c b/port/src/input.c index 966d5b2d..3d87cc8c 100644 --- a/port/src/input.c +++ b/port/src/input.c @@ -1136,12 +1136,16 @@ unsigned inputComputePad(int idx, signed char *stick_x, signed char *stick_y) button |= GE_CONT_B; int padMenuMode = (current_menu != GE_MENU_RUN_STAGE && current_menu != GE_MENU_INVALID); - if (!padMenuMode) { + { int lbNow = SDL_GameControllerGetButton(pad, SDL_CONTROLLER_BUTTON_LEFTSHOULDER); int rbNow = SDL_GameControllerGetButton(pad, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER); int *prev = &padShoulderPrev[idx]; - if (rbNow && !(*prev & 1)) button |= GE_CONT_A; /* next weapon */ - if (lbNow && !(*prev & 2)) button |= GE_CONT_A | GE_CONT_G; /* prev weapon */ + /* Track edge state in menus too: a shoulder held across the + * menu->game transition must not fire a cycle on entry. */ + if (!padMenuMode) { + if (rbNow && !(*prev & 1)) button |= GE_CONT_A; /* next weapon */ + if (lbNow && !(*prev & 2)) button |= GE_CONT_A | GE_CONT_G; /* prev weapon */ + } *prev = (rbNow ? 1 : 0) | (lbNow ? 2 : 0); } if (SDL_GameControllerGetButton(pad, SDL_CONTROLLER_BUTTON_START))