作者jans0204 (jans0204)
看板Old-Games
标题Re: [问题] Dosbox更换视窗大小
时间Mon Apr 3 15:54:53 2023
# (w,hg,ht,wg)
# windowresolution=w,hg
w: 设定的视窗宽。
hg: 设定的视窗高。因数据已约整,所以也是实测的图形高。
ht: 实测文字模式高。
wg: 实测图形模式宽,若等於w则省略。
底下是实测数据:
w hg ht (wg)
-------------- ----
320 240 200
640 480 400
800 600 500
1024 768 640
1280 960 800
1360 1020 850
1600 1200 1000
1685 1053 1053 1404
1685 1263 1053 1684
668 501 417
--------------
8 : 6 : 5
公式:
if INT(w*5/8)=hg then ht=hg, wg=INT(ht*4/3)
else
i=(w/4), j=(hg/3)
case of
(i<=j): ht=INT(w*5/8)
(i>j): ht=INT(hg*5/6), wg=INT(hg*4/3)
实测,截图:
# win11 frame +(2,27)
https://github.com/jans0204/GAME/tree/main/DOSBox/DOSBox-MAX-new
https://raw.githubusercontent.com/jans0204/GAME/main/DOSBox/DOSBox-MAX-new/dosbox.conf
# (w,hg,ht)=(640,480,400)
# windowresolution=original
# original 图形模式不受限於视窗大小。所以不等於下列设定。
# (w,hg,ht)=(640,480,400)
# windowresolution=640x480
# (w,hg,ht)=(320,240,200)
# windowresolution=320x240
# (w,hg,ht)=(800,600,500)
# windowresolution=800x600
# (w,hg,ht)=(1024,768,640)
# windowresolution=1024x768
# (w,hg,ht)=(1280,960,800)
windowresolution=1280x960
# BEST: fit double-size render: 2xSai
# (w,hg,ht)=(1360,1020,850)
# windowresolution=1360x1020
# (w,hg,ht)=(1600,1200,1000)
# windowresolution=1600x1200
# win11 frame +(2,27) -> 1080-27=1053
# windowresolution=1920x1053
#
# (w,hg,ht,wg)=(1685,1053,1053,1404)
# windowresolution=1685x1053
#
# (w,hg,ht,wg)=(1685,1263,1053,1684)
# windowresolution=1685x1263
# random test: [(320,240)+(1024,768)]/2-(4,3)=(668,501)
# (w,hg,ht)=(668,501,417)
# windowresolution=668x501
-END-
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 124.218.31.163 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Old-Games/M.1680508496.A.E32.html
1F:推 cult2: 专业必须推! 04/03 15:59
2F:推 Raelian: 必须推一下 04/05 23:13