diff options
| author | user <user@clank> | 2026-07-16 16:46:21 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-16 16:46:21 +0200 |
| commit | 0db949c3a3ab07b264c21c3a15efea6b6055be0d (patch) | |
| tree | 2d6cdae9ee9983d53838d29a6d7041d26cfab58c /src/joypad.asm | |
| parent | term/osk: view-offset scroll region (lossless backlog on OSK toggle) (diff) | |
| download | gbos-0db949c3a3ab07b264c21c3a15efea6b6055be0d.tar.gz gbos-0db949c3a3ab07b264c21c3a15efea6b6055be0d.tar.xz gbos-0db949c3a3ab07b264c21c3a15efea6b6055be0d.zip | |
term: compute the OSK view offset from the cursor row (keep input visible)
A fixed offset of OSK_ROWS pushed the cursor off the top of the screen when
there was little backlog (e.g. a fresh terminal: cursor at logical row 0 ->
screen row -3, hidden). Now the offset is max(0, wCurRow - 14): 0 when the
cursor is within the visible area, growing only enough to keep the cursor
line at the bottom visible row (14) once the terminal has filled past it.
compute_offset (from wOskVisible + wCurRow) runs at the top of
term_write_tilemap; cursor_down re-runs the tilemap when the cursor changes
rows while the OSK is up; osk_toggle just re-runs it. Shared OSK_DOCK
constant in gbos.inc keeps term.asm and osk.asm in sync.
Verified: fresh terminal + OSK shows the input at row 0; filling past row 14
shifts the view to hold the input at row 14; full screen + OSK puts it at
row 14; toggle on+off is still lossless.
Diffstat (limited to 'src/joypad.asm')
0 files changed, 0 insertions, 0 deletions
