作者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/m.aspx?n=bbs/Old-Games/M.1680508496.A.E32.html
1F:推 cult2: 專業必須推! 04/03 15:59
2F:推 Raelian: 必須推一下 04/05 23:13