You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Tells the Android compositor your target frame rate for optimal scheduling
102
-
- On Samsung DeX, it finds and uses the external display's best mode
101
+
- Tells the Android compositor your target frame rate for optimal scheduling (`Surface.SetFrameRate` with the *seamless-only* flag, so a mode change can never destroy the active Vulkan swapchain mid-frame)
102
+
- On Samsung DeX, queries the active (external) display's mode list via `Activity.Display` / `DisplayManager`
103
103
104
104
---
105
105
106
106
### 🖥️ Samsung DeX
107
107
108
108
Plug your phone into a monitor and play on the big screen:
109
109
110
-
-**Auto-detected** — the game knows when you're in DeX mode
111
-
- Performance mode and immersive fullscreen turn on automatically
112
-
- External display refresh rate is detected and applied
113
-
- Keyboard + mouse input works seamlessly (no extra setup)
114
-
- The game stays alive during display transitions (no restart)
110
+
-**Auto-detected** via `UiMode.TypeDesk` — the game knows when you're in DeX mode
111
+
- Performance mode and immersive fullscreen turn on automatically when DeX is connected
112
+
- The active display's mode list is enumerated and the highest refresh rate is **requested** via `WindowManagerLayoutParams.PreferredDisplayModeId` (see honest caveat below)
113
+
- Keyboard + mouse input works because of the dedicated `AndroidMouseHandler` / `AndroidKeyboardHandler` (those handlers aren't DeX-specific — they apply equally to USB peripherals on a phone)
114
+
- The Activity is annotated with `ConfigurationChanges = …UiMode|ScreenSize|ScreenLayout|Density|…` so the game stays alive across DeX dock/undock without a full process restart
115
+
116
+
> **Honest caveat:** Samsung DeX runs your activity inside a virtual display that is fully managed by Samsung's compositor. From a regular (non-system) app, **there is no public Android API to enumerate the physical monitor's true EDID mode list or to force a specific resolution/refresh rate on the HDMI link** — the only public hook is `WindowManagerLayoutParams.PreferredDisplayModeId`, which DeX treats as a hint and frequently ignores. The mode list returned by `display.GetSupportedModes()` for the DeX virtual display is whatever DeX itself chooses to advertise, not the monitor's full mode list. Resolution change is not attempted (no public API exists). The DeX-mode fast-path in this fork is therefore: detect DeX, flip performance + immersive toggles, ask the compositor nicely for the highest refresh rate it will admit to. Anything beyond that requires the vendor-private `com.samsung.android.dex.SDexManager`, which is signature-protected and not callable from a normal app.
0 commit comments