aboutsummaryrefslogtreecommitdiffstats
path: root/src/osk.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/osk.asm')
-rw-r--r--src/osk.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osk.asm b/src/osk.asm
index a34a863..5e316e3 100644
--- a/src/osk.asm
+++ b/src/osk.asm
@@ -236,9 +236,9 @@ osk_toggle::
ld [wOskVisible], a
or a
jr z, .hide
- ; show: shrink the terminal to the rows above the keyboard, then enable window
- ld a, 18 - OSK_ROWS
- call term_set_rows
+ ; show: shift the view up so the cursor line clears the keyboard
+ ld a, OSK_ROWS
+ call term_set_view
ld a, [rLCDC]
or %00100000
ld [rLCDC], a
@@ -247,8 +247,8 @@ osk_toggle::
ld a, [rLCDC]
and %11011111
ld [rLCDC], a
- ld a, 18 ; restore full-height terminal
- call term_set_rows
+ xor a ; view unshifted -> full 18-row backlog
+ call term_set_view
ret
; movement with wrap-around; each moves the highlight