method: a refusing instrument, and a boot that outlasts its capture script
Two traps this run paid for. ring_row.py's ROW0/SPACING are x11grab constants. On a /sylph-home/re/shots/shot-0001.png grab of the same live main menu the rows read 180.5/419.5/502.0 -- ROW0 is 45 px out, 0.57 of a step. The module refused rather than naming the wrong item, which is the good failure, and is_main_menu() therefore returned False ON A REAL MAIN MENU. A run gated on it would conclude 'not the menu' while sitting on the menu. Not recalibrated: three rows from one session are not a calibration and other tools share the constants; the module now says so where the numbers are. menu_draw_capture.sh's 420 s title deadline fired, and the emulator left running was at the settled title minutes later, took one A, and reached the menu first try. A timeout is a measurement of the timeout. Leaving the emulator up after a failed script rescued this run for one minute against a twenty-minute reboot. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
This commit is contained in:
@@ -41,6 +41,23 @@ DECOR_ROWS = 50 # window title bar + menu bar live above this
|
||||
FOOTER_Y = 620 # the button-legend strip is bright in the gutter too
|
||||
NAMES = ["NEW GAME", "LOAD GAME", "TUTORIAL", "OPTIONS", "EXTRAS"]
|
||||
ROW0, SPACING = 225.5, 79.25 # measured, main menu, x11grab
|
||||
# 🔴 THESE ARE x11grab CONSTANTS AND THEY DO NOT FIT A `screenshot` GRAB
|
||||
# (2026-08-31). Three rows read off `screenshot` frames of a live main menu,
|
||||
# ground-truthed by eye against the rendered PNG:
|
||||
#
|
||||
# NEW GAME 180.5 OPTIONS 419.5 EXTRAS 502.0 (1279x675)
|
||||
# -> ROW0 ~180.5, SPACING ~80.4, i.e. ROW0 is 45 px = 0.57 of a step out
|
||||
#
|
||||
# `main_menu_item()` therefore REFUSES on such a frame rather than returning a
|
||||
# wrong item, and `is_main_menu()` returns False ON A REAL MAIN MENU. That is the
|
||||
# safe failure and it is still a failure: a script that gates on
|
||||
# `is_main_menu()` will conclude "not the menu" while sitting on the menu.
|
||||
#
|
||||
# Not recalibrated here on purpose: three rows from one session are not a
|
||||
# calibration, other tools share these constants, and the x11grab numbers are
|
||||
# correct for x11grab. Whoever needs the `screenshot` path should measure it
|
||||
# properly and give the module TWO calibrations selected by frame size, rather
|
||||
# than moving one set of numbers and silently breaking the other.
|
||||
MENU_GLYPH_LO, MENU_GLYPH_HI = 250, 420 # the glyph-327 menu detector
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user