feat: performance overlay
This commit is contained in:
@@ -49,6 +49,7 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
static const String _keyCustomDownloadPathType = 'custom_download_path_type';
|
||||
static const String _keyDownloadOnWifiOnly = 'download_on_wifi_only';
|
||||
static const String _keyVideoPlayerNavigationEnabled = 'video_player_navigation_enabled';
|
||||
static const String _keyShowPerformanceOverlay = 'show_performance_overlay';
|
||||
|
||||
SettingsService._();
|
||||
|
||||
@@ -431,6 +432,15 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
return prefs.getBool(_keyVideoPlayerNavigationEnabled) ?? TvDetectionService.isTVSync();
|
||||
}
|
||||
|
||||
// Performance Overlay (show debug stats on video player)
|
||||
Future<void> setShowPerformanceOverlay(bool enabled) async {
|
||||
await prefs.setBool(_keyShowPerformanceOverlay, enabled);
|
||||
}
|
||||
|
||||
bool getShowPerformanceOverlay() {
|
||||
return prefs.getBool(_keyShowPerformanceOverlay) ?? false; // Default: disabled
|
||||
}
|
||||
|
||||
// Helper methods for HotKey serialization
|
||||
static const _modifierMap = <String, HotKeyModifier>{
|
||||
'alt': HotKeyModifier.alt,
|
||||
@@ -830,6 +840,7 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
prefs.remove(_keyCustomDownloadPathType),
|
||||
prefs.remove(_keyDownloadOnWifiOnly),
|
||||
prefs.remove(_keyVideoPlayerNavigationEnabled),
|
||||
prefs.remove(_keyShowPerformanceOverlay),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user