• src/doors/termgfx/stats.c termgfx_termio.c

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sat Jul 25 23:10:03 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/ced6dbbaecd42f31c0ac5000
    Modified Files:
    src/doors/termgfx/stats.c termgfx_termio.c
    Log Message:
    termgfx: true aspect on the fitted image, and don't call 1fps "no data"

    Two things a live F4 sixel session on SyncTERM turned up, neither of them
    new.

    THE SHAPE. termgfx_geom_fit()'s 8% allowance stretches away a thin
    leftover bar so a near-fit fills the canvas, which is right where the bar
    is an accident of the canvas. It is wrong here, because the sixel tier manufactures its own: it reserves the bottom text row for the stats and
    idle strips, so a canvas that fitted exactly becomes height-limited and
    leaves a side bar, which the allowance then hides by stretching the
    picture back out. At 80x25 that is a 4% vertical squash -- 640x384 where
    the source wants 614x384 -- while the JXL tier reserves nothing, fits
    640x400 exactly, and stays true. Two tiers disagreeing about the shape of
    the same game is the tell, and only that geometry shows it: on a canvas
    where the fit is width-limited there is no bar and nothing stretches,
    which is why it survived the measurements taken there.

    Fit at true aspect instead (max_stretch_pct 0), which is what
    syncconquer's own fit already passes. Letterboxing 13px a side is the
    cheaper mistake than reshaping the game.

    THE READOUT. fps was frames * 1000 / elapsed, truncated. A window is ~1s,
    so a scene drawing ONE frame in it came out as zero -- and the strip
    renders zero as "-fps -KB/f", which means "nothing drawn yet". A slow but perfectly healthy scene (an adventure sitting in a static room with one
    banner animating) reported itself as dead. Round instead of truncate, and
    keep a flag for "a window has closed with frames in it" so "-" can only
    ever mean startup. Bytes per frame now comes straight from the window
    rather than from dividing two rounded numbers, which lost accuracy exactly where the numbers are small. The same truncation was in stats.c's shared window, so the sibling doors under-reported slow scenes too; fixed there
    as well.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)