more reliable hardware screen detection

This commit is contained in:
~d6 2024-08-18 23:46:27 -04:00
parent e618a8010a
commit c0443e0b03
2 changed files with 15 additions and 6 deletions

Binary file not shown.

View File

@ -134,14 +134,23 @@
draw !auto-move
@init-screen ( -> )
( try to set 256x192; detect platforms that can't resize )
#0100 .Screen/w DEO2
#00c0 .Screen/h DEO2
( our target resolution is 256x192. )
( )
( if the emulator's screen is more than twice that in )
( either dimension we'll request a resize to 256x192. )
( )
( this will faciliate zooming, which is better for )
( high resolution screens. )
.Screen/w DEI2 #0200 LTH2
.Screen/h DEI2 #0180 LTH2 AND ?&save
( save whatever size we get back )
( resize to 256x192 )
#0100 .Screen/w DEO2 #00c0 .Screen/h DEO2
( save screen dimensions for future use )
&save
.Screen/w DEI2 .width STZ2
.Screen/h DEI2 .height STZ2
JMP2r
.Screen/h DEI2 .height STZ2 JMP2r
@clear-fg ( -> )
#0000 .Screen/x DEO2