feat: extend Force TV mode to desktop for home-theater setups
Initialize TvDetectionService on every platform so the existing force_tv_mode setting drives the 10-foot TV interface on Windows, macOS, and Linux, and surface the toggle in appearance settings there. Desktop keeps real-mouse behavior in TV mode: InputModeTracker still flips between pointer and keyboard modes (cursor hidden while keyboard-driven), segmented controls keep their hover affordance, and the settings backup section stays available (only Android TV lacks a document picker). Adds PlatformDetector.debugSetIsDesktopOSOverride so TV-device simulations in widget tests don't inherit the desktop test host's platform. close #1409
This commit is contained in:
+4
-4
@@ -179,10 +179,10 @@ Future<void> _bootstrapApp() async {
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize TV detection (Android leanback or Apple TV) and PiP on Android.
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
futures.add(TvDetectionService.getInstance(forceTv: settings.read(SettingsService.forceTvMode)));
|
||||
}
|
||||
// Initialize TV detection on every platform: auto-detect covers Android
|
||||
// leanback and Apple TV; the force-TV setting applies anywhere, including
|
||||
// desktop home-theater setups.
|
||||
futures.add(TvDetectionService.getInstance(forceTv: settings.read(SettingsService.forceTvMode)));
|
||||
// Visual-effects tier (auto-detects low-end Android; full elsewhere).
|
||||
futures.add(DevicePerformance.getInstance(override: settings.read(SettingsService.visualEffects)));
|
||||
if (Platform.isAndroid) {
|
||||
|
||||
Reference in New Issue
Block a user