这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@edigaryev
Copy link
Collaborator

A simpler alternative to #1151, without introducing a new command-line argument.

Resolves #1150, closes #1151.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

if let display = display {
if (display.width > 0) {
vmConfig.display.width = display.width
}
if (display.height > 0) {
vmConfig.display.height = display.height
}

P1 Badge Preserve display unit when applying --display argument

The new parser correctly recognizes pt/px suffixes, but run() only copies width and height into the VM config and drops the parsed unit. As a result a call like tart set --display 1920x1080px writes the same configuration as tart set --display 1920x1080, so vmConfig.display.unit remains nil and Darwin continues to treat the values as points. The new pixel hint never reaches Platform.Darwin.graphicsDevice, so the feature does not work. vmConfig.display.unit should be updated when the option is provided.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@edigaryev
Copy link
Collaborator Author

The new parser correctly recognizes pt/px suffixes, but run() only copies width and height into the VM config and drops the parsed unit.

Thanks, fixed in 72b58b5.

@fkorotkov fkorotkov merged commit 68ffa6c into main Oct 22, 2025
6 checks passed
@fkorotkov fkorotkov deleted the tart-set-display-units branch October 22, 2025 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display Sizing Confusion

3 participants