Default to window-based capture resolution; add --width/--height override (fixes #10)#20
Default to window-based capture resolution; add --width/--height override (fixes #10)#20dffdeeq wants to merge 2 commits intoMineDojo:mainfrom
Conversation
… and bbox format fix
73a9e5e to
04c8c5e
Compare
|
I have found that this PR needs to be combined with this modification to work effectively in different DPI scaling ratios when I run the game in window mode. |
is dxcam really seeing a scaled output res on your setup, or is the window just slipping a bit off-screen at high DPI? Example where the window fits (works) (image 1): [WIN] GetWindowRect: (474, 68, 2086, 1326) Example where it’s shifted a bit and extends past a 2560x1440 output (fails) (image 2): [WIN] GetWindowRect: (1006, 260, 2618, 1518) then: ValueError: Invalid Region: Region should be in 2560x1440 And the outer window frame is larger than the working area, so it is easy to go beyond it when using a high DPI
|


Fix screen capture to default to the game window resolution and correct dxcam region format (fixes #10).
Changes:
Previously both were fed the same format, which could result in an invalid region or partial capture.
Usage:
automatically uses window resolution:
python scripts/play.py --process game.exeoverride with custom resolution:
python scripts/play.py --process game.exe --width 1920 --height 1080Testing: