Repository navigation
feat: 实例设置加 DPI 和横竖屏 - #200
Merged
Merged
Conversation
- DPI:默认跟随分辨率(720p 240、1080p 280),可选 160 / 240 / 280 / 320 / 400 / 480, 记在 mas-avd.json 的 instances.<i>.dpi,每次开机前写进 hw.lcd.density,换分辨率时保留。 - 方向:横屏(默认)/ 竖屏。写 config.ini 的 hw.initialOrientation,画布仍是横的; 开机后 user_rotation 横屏 0、竖屏 3,和模拟器(ModAVD/ModAVD#225 的修复)一致。 - 管理器新建和设置、modavd create / set 的 --dpi / --orientation、HTTP API、MCP 都加上; 中英文案、API.md、README 同步。 Refs ModAVD/ModAVD#247
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs ModAVD/ModAVD#247
实例设置(和新建对话框)在「分辨率」下面加了 DPI 和方向两项,都是下次开机生效。分辨率仍然只有 1080p、720p 两档。
DPI
mas-avd.json的instances.<i>.dpi,每次开机前和分辨率一起写进 config.ini 的hw.lcd.density,换分辨率时保留;改回跟随就删掉这个键。没设过的老实例开机和以前完全一样。方向
hw.initialOrientation。画布仍是横的 1280×720 / 1920×1080,不互换宽高。user_rotation= 0,竖屏 = 3。模拟器开机时按hw.initialOrientation写这个值,管理器开机后设的也是同一个值(setupOrientation,以前写死 0),两边不打架。入口
modavd create/modavd set加--dpi auto|N、--orientation landscape|portrait。POST /api/instances、PATCH /api/instances/{i}加dpi、orientation;InstanceConfig多dpi_setting、orientation。create_instance/update_instance加dpi、orientation。API.md/API.en.md、README 同步;changelog.d/247-dpi-orientation.feat.md。测试
go vet ./...(含 darwin/arm64、linux/amd64)、go test ./...全过;node 测试全过。TestDPIAndOrientation(新建、换分辨率后保留、开机前写入、改回、旧竖屏配置、非法值不写盘),emu、CLI、HTTP、MCP 的接线测试也加了这两项。scripts/test_resolution_guards.py加了两个变体,13 个全部能被测试抓到。