• src/conio/bitmap_con.c

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Wednesday, March 04, 2026 23:48:10
    https://gitlab.synchro.net/main/sbbs/-/commit/cd13711d07a94744ef301142
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix bug calculating snaps in height-controlled modes.

    There really aren't that many height-controlled modes, but an error
    in the number of scanlines made ST132X36_16_9 into one.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Saturday, March 14, 2026 18:14:10
    https://gitlab.synchro.net/main/sbbs/-/commit/090c08a33308e9832fa21e6f
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix chunk end calculation for split vmem update

    Previously, would write the same areas multiple times, potentially
    resulting in differrent CRCs.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Saturday, March 14, 2026 18:14:10
    https://gitlab.synchro.net/main/sbbs/-/commit/58ce9083d1d0352337d28c18
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Perform split updates with a single lock

    No need for a lock/unlock wrapper.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Saturday, March 14, 2026 18:14:10
    https://gitlab.synchro.net/main/sbbs/-/commit/5bffab544f4fb52d66e4cf4a
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix a handful of subtle bugs caught running the terminal test...

    1) bitmap_draw_from_vmem() had some math wrong, which could result
    in a frame or two of the screen being drawn split. This was visible
    as a flash of the status bar being in the middle of the screen.
    2) With the update to a rwlock, the force parameter to update_from_vmem()
    NEEDS to ensure a redraw is done for consistency. While eventual
    consisency is fine for most cases, getting the checksum of a region
    strictly requires the region is fully updated first.
    3) vstat was being written in two cases with the read lock held...
    one was when resetting the "changed" flag to false during an
    update, and the other was when adjusting the reveal bit in prestel
    mode.
    4) bitmap_movetext() and the corresponding bitmap_movetext_screen()
    almost certainly had a bug in them. They basically did the exact
    same thing, just one to the vmem and the other to the screen data.
    How they went about that however was wildly different. Rewrote
    most of these functions so they re-use calculations and don't
    both do hard-to-understand math.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sunday, March 15, 2026 14:09:13
    https://gitlab.synchro.net/main/sbbs/-/commit/8dda8ba2f94dd1534aacf061
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Fix integer division in bitmap_setcustomcursor() cursor scaling

    The ratio variable is declared as double, but vstat.charheight/r performed integer division since both operands are int. This truncated the scaling
    ratio (e.g. 16/14 = 1 instead of 1.143), causing cursor start/end positions
    to not scale correctly when switching between font heights.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, March 17, 2026 00:41:05
    https://gitlab.synchro.net/main/sbbs/-/commit/e0b825c458da099f74f1fc6d
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Pre-compute Prestel double-height row states once per frame

    calc_charstate() was scanning all rows 0..ypos-1 for every cell to
    determine top/bottom double-height status, making full redraws
    O(rows^2 * cols). Pre-compute the row state array once in
    update_from_vmem() and pass it through the call chain. Callers from bitmap_setpixel/setpixels pass NULL to retain the existing per-cell
    scan (always single-cell, so the old path is fine).

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, March 17, 2026 10:47:28
    https://gitlab.synchro.net/main/sbbs/-/commit/070cbc5c3dc94166d5f5a667
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Remove TODO comment... yes, we do.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, March 17, 2026 11:59:17
    https://gitlab.synchro.net/main/sbbs/-/commit/14f279ca37de873b6fb75317
    Modified Files:
    src/conio/bitmap_con.c
    Log Message:
    Hold vstat_chlock when setting vmem->changed in blinker thread

    Every other write to vmem->changed holds vstat_chlock; this was the
    sole exception. The wrlock on vstatlock already prevented concurrent
    access in practice, but this makes the locking protocol consistent
    and is not in a hot path. (Coverity CID 644904)

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