perf: 适配高分辨率下的缩放

This commit is contained in:
知一一 2025-06-03 12:46:12 +08:00
parent 1d26f88ecc
commit 2b9ff8de8f
1 changed files with 7 additions and 9 deletions

View File

@ -6,7 +6,7 @@ CoordMode "Pixel", "Client"
CoordMode "Mouse", "Client" CoordMode "Mouse", "Client"
;region 设置常量 ;region 设置常量
try TraySetIcon "doro.ico" try TraySetIcon "doro.ico"
currentVersion := "v1.0.0-beta.6" currentVersion := "v1.0.0-beta.7"
usr := "1204244136" usr := "1204244136"
repo := "DoroHelper" repo := "DoroHelper"
;endregion 设置常量 ;endregion 设置常量
@ -17,16 +17,13 @@ if A_Username != 12042 {
=========================== ===========================
11080p分辨率 11080p分辨率
2100%2K分辨率 2
3100%4K分辨率
4
=========================== ===========================
=========================== ===========================
169HDR 169HDR
--100%nikke的缩放
ctrl+3nikke应该是居中的1 ctrl+3nikke应该是居中的1
=========================== ===========================
@ -429,7 +426,8 @@ Initialization() {
nikkeID := winID nikkeID := winID
WinGetClientPos &NikkeX, &NikkeY, &NikkeW, &NikkeH, nikkeID WinGetClientPos &NikkeX, &NikkeY, &NikkeW, &NikkeH, nikkeID
WinGetPos &NikkeXP, &NikkeYP, &NikkeWP, &NikkeHP, nikkeID WinGetPos &NikkeXP, &NikkeYP, &NikkeWP, &NikkeHP, nikkeID
currentScale := A_ScreenDPI / 96 ;确定dpi缩放比例主要影响识图 ; currentScale := A_ScreenDPI / 96 ;确定dpi缩放比例主要影响识图
currentScale := 1
scrRatio := NikkeH / stdScreenH ;确定nikke尺寸之于额定尺寸的比例4K主要影响点击 scrRatio := NikkeH / stdScreenH ;确定nikke尺寸之于额定尺寸的比例4K主要影响点击
WinRatio := Round(NikkeW / 2331, 3) ;确定nikke尺寸之于额定nikke尺寸的比例我是在nikke工作区宽度2331像素的情况下截图的主要影响识图 WinRatio := Round(NikkeW / 2331, 3) ;确定nikke尺寸之于额定nikke尺寸的比例我是在nikke工作区宽度2331像素的情况下截图的主要影响识图
TrueRatio := Round(currentScale * WinRatio, 3) TrueRatio := Round(currentScale * WinRatio, 3)
@ -442,9 +440,9 @@ Initialization() {
if A_ScreenWidth < 2331 { if A_ScreenWidth < 2331 {
MsgBox ("屏幕尺寸过小,请更换显示器!") MsgBox ("屏幕尺寸过小,请更换显示器!")
} }
if A_ScreenDPI != 96 { ; if A_ScreenDPI != 96 {
MsgBox ("缩放比例不为100%,请更改!") ; MsgBox ("缩放比例不为100%,请更改!")
} ; }
if Round(WinRatio) != 1 { if Round(WinRatio) != 1 {
MsgBox ("请按ctrl+3调整游戏尺寸直到没有此提示") MsgBox ("请按ctrl+3调整游戏尺寸直到没有此提示")
} }