Skip to content

feat: add Smart Auto-Adapt display engine and runtime SDK Shift support - #261

Open
Rengwang wants to merge 2 commits into
PlayCover:masterfrom
Rengwang:pr/feat-smart-auto-adapt-and-sdk-shift
Open

Rengwang wants to merge 2 commits into
PlayCover:masterfrom
Rengwang:pr/feat-smart-auto-adapt-and-sdk-shift

Conversation

@Rengwang

Copy link
Copy Markdown

Summary

  • Add Smart Auto-Adapt (resolution == 7) dual-mode display engine in PlayScreen and AKPlugin:
    • Detects adaptive layout capability from app Info.plist (UIDeviceFamily, DTSDKName >= 27.1 Duo adaptive support, UIRequiresFullScreenIgnoredStartingWithVersion, UISupportedInterfaceOrientations~iphone, and UIApplicationSceneManifest).
    • Automatically runs native adaptive resizing for capable apps (with runtime horizontal-overflow fallback detection) and clean aspect-locked logical canvas scaling (9:16, 16:9, 3:4, or custom aspect ratio) for non-adaptive fixed-layout apps without cropping or distortion.
  • Improve TouchscreenMouseEventAdapter.cursorPos() to use NSWindow.contentLayoutRect instead of raw window frame (eliminating titlebar offset) and map normalized content coordinates accurately in dynamic/scaled modes.
  • Add opt-in SDK Shift (sdkShift, default false, inspired by beinglida/SDKShift-for-Duo) to provide iphoneos27.2 / UIRequiresFullScreen = false metadata via NSBundle.main hooks and lift fullscreen/aspect locks so fixed-ratio iPhone apps can resize freely.

Verification

  • Verified with swiftlint lint --strict --quiet (0 warnings/errors).
  • Built AKInterface (macosx) and PlayTools (iphoneos) in Release configuration via xcodebuild.

@Rengwang

Copy link
Copy Markdown
Author

Companion PlayCover UI/settings PR: PlayCover/PlayCover#2293

@Rengwang

Copy link
Copy Markdown
Author

Updated:

  • Persist and restore last window frame/size across launches (PlayCover.SavedWindowFrame.v1).
  • Prevent non-fullscreen subviews (such as 0-height status bars) from inflating in scaled mode while still clamping oversized full-canvas subviews.
  • Sync scaled transforms across eligible scene windows and align UIKit coordinate-space conversion with nativeScale.
  • Restrict runtime 9:16 fallback to eligible phone-only apps (>=500pt wide) and coalesce adaptive live-resize window frame updates.

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.

1 participant