From 5302f418db05941ab74ca5293106dd2fe31a5039 Mon Sep 17 00:00:00 2001 From: Acaki Date: Wed, 19 Feb 2025 23:59:37 +0800 Subject: [PATCH] feat: add YUV444 toggle --- Limelight/Base.lproj/iPad.storyboard | 218 ++++++++++-------- Limelight/Base.lproj/iPhone.storyboard | 54 +++-- Limelight/Database/DataManager.h | 1 + Limelight/Database/DataManager.m | 2 + Limelight/Database/TemporarySettings.h | 1 + Limelight/Database/TemporarySettings.m | 2 + .../Moonlight v1.10.xcdatamodel/contents | 5 +- .../ViewControllers/SettingsViewController.h | 1 + .../ViewControllers/SettingsViewController.m | 3 + 9 files changed, 167 insertions(+), 120 deletions(-) diff --git a/Limelight/Base.lproj/iPad.storyboard b/Limelight/Base.lproj/iPad.storyboard index c887646f..6509fa91 100644 --- a/Limelight/Base.lproj/iPad.storyboard +++ b/Limelight/Base.lproj/iPad.storyboard @@ -1,9 +1,9 @@ - + - + @@ -12,7 +12,7 @@ - + @@ -370,101 +370,15 @@ ICAgICAgICAgICAgICA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -548,22 +462,125 @@ ICAgICAgICAgICAgICA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -574,7 +591,7 @@ ICAgICAgICAgICAgICA - + @@ -631,6 +648,7 @@ ICAgICAgICAgICAgICA + @@ -646,7 +664,7 @@ ICAgICAgICAgICAgICA - + @@ -686,7 +704,7 @@ ICAgICAgICAgICAgICA - + @@ -708,7 +726,7 @@ ICAgICAgICAgICAgICA - + @@ -735,7 +753,7 @@ ICAgICAgICAgICAgICA - + @@ -953,11 +971,11 @@ ICAgICAgICAgICAgICA - + - + diff --git a/Limelight/Base.lproj/iPhone.storyboard b/Limelight/Base.lproj/iPhone.storyboard index ab2a8ffd..cff0e2ac 100644 --- a/Limelight/Base.lproj/iPhone.storyboard +++ b/Limelight/Base.lproj/iPhone.storyboard @@ -1,9 +1,9 @@ - + - + @@ -349,14 +349,14 @@ ICAgICAgICAgICAgIA - + @@ -366,14 +366,14 @@ ICAgICAgICAgICAgIA - + @@ -383,14 +383,14 @@ ICAgICAgICAgICAgIA - + @@ -400,14 +400,14 @@ ICAgICAgICAgICAgIA - + @@ -531,14 +531,14 @@ ICAgICAgICAgICAgIA - + @@ -548,14 +548,14 @@ ICAgICAgICAgICAgIA - + @@ -565,14 +565,14 @@ ICAgICAgICAgICAgIA - + @@ -583,14 +583,14 @@ ICAgICAgICAgICAgIA - + @@ -600,6 +600,23 @@ ICAgICAgICAgICAgIA + + + + + + + + + + + @@ -647,6 +664,7 @@ ICAgICAgICAgICAgIA + diff --git a/Limelight/Database/DataManager.h b/Limelight/Database/DataManager.h index d250fa94..c0797e21 100644 --- a/Limelight/Database/DataManager.h +++ b/Limelight/Database/DataManager.h @@ -36,6 +36,7 @@ swapABXYButtons:(BOOL)swapABXYButtons audioOnPC:(BOOL)audioOnPC preferredCodec:(uint32_t)preferredCodec + enableYUV444:(BOOL)enableYUV444 useFramePacing:(BOOL)useFramePacing enableHdr:(BOOL)enableHdr btMouseSupport:(BOOL)btMouseSupport diff --git a/Limelight/Database/DataManager.m b/Limelight/Database/DataManager.m index 7e2975f9..3cebfb84 100644 --- a/Limelight/Database/DataManager.m +++ b/Limelight/Database/DataManager.m @@ -75,6 +75,7 @@ swapABXYButtons:(BOOL)swapABXYButtons audioOnPC:(BOOL)audioOnPC preferredCodec:(uint32_t)preferredCodec + enableYUV444:(BOOL)enableYUV444 useFramePacing:(BOOL)useFramePacing enableHdr:(BOOL)enableHdr btMouseSupport:(BOOL)btMouseSupport @@ -112,6 +113,7 @@ settingsToSave.swapABXYButtons = swapABXYButtons; settingsToSave.playAudioOnPC = audioOnPC; settingsToSave.preferredCodec = preferredCodec; + settingsToSave.enableYUV444 = enableYUV444; settingsToSave.useFramePacing = useFramePacing; settingsToSave.enableHdr = enableHdr; settingsToSave.btMouseSupport = btMouseSupport; diff --git a/Limelight/Database/TemporarySettings.h b/Limelight/Database/TemporarySettings.h index 5dbe9e65..35bffde0 100644 --- a/Limelight/Database/TemporarySettings.h +++ b/Limelight/Database/TemporarySettings.h @@ -42,6 +42,7 @@ CODEC_PREF_HEVC, CODEC_PREF_AV1, } preferredCodec; +@property (nonatomic) BOOL enableYUV444; @property (nonatomic) BOOL reverseMouseWheelDirection; @property (nonatomic) BOOL largerStickLR1; @property (nonatomic) BOOL useFramePacing; diff --git a/Limelight/Database/TemporarySettings.m b/Limelight/Database/TemporarySettings.m index dbc78d7c..c910b49d 100644 --- a/Limelight/Database/TemporarySettings.m +++ b/Limelight/Database/TemporarySettings.m @@ -37,6 +37,7 @@ self.audioConfig = [NSNumber numberWithInteger:[[NSUserDefaults standardUserDefaults] integerForKey:@"audioConfig"]]; assert([self.audioConfig intValue] != 0); self.preferredCodec = (typeof(self.preferredCodec))[[NSUserDefaults standardUserDefaults] integerForKey:@"preferredCodec"]; + self.enableYUV444 = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableYUV444"]; self.useFramePacing = [[NSUserDefaults standardUserDefaults] integerForKey:@"useFramePacing"] != 0; self.playAudioOnPC = [[NSUserDefaults standardUserDefaults] boolForKey:@"audioOnPC"]; self.enableHdr = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableHdr"]; @@ -75,6 +76,7 @@ self.width = settings.width; self.audioConfig = settings.audioConfig; self.preferredCodec = settings.preferredCodec; + self.enableYUV444 = settings.enableYUV444; self.useFramePacing = settings.useFramePacing; self.playAudioOnPC = settings.playAudioOnPC; self.enableHdr = settings.enableHdr; diff --git a/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents b/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents index e716f972..5178e199 100644 --- a/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents +++ b/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents @@ -1,5 +1,5 @@ - + @@ -26,6 +26,7 @@ + @@ -57,4 +58,4 @@ - \ No newline at end of file + diff --git a/Limelight/ViewControllers/SettingsViewController.h b/Limelight/ViewControllers/SettingsViewController.h index 6f9affbf..6ead3cae 100644 --- a/Limelight/ViewControllers/SettingsViewController.h +++ b/Limelight/ViewControllers/SettingsViewController.h @@ -28,6 +28,7 @@ @property (strong, nonatomic) IBOutlet UISegmentedControl *swapABXYButtonsSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *audioOnPCSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *codecSelector; +@property (strong, nonatomic) IBOutlet UISegmentedControl *yuv444Selector; @property (strong, nonatomic) IBOutlet UISegmentedControl *hdrSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *framePacingSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *btMouseSelector; diff --git a/Limelight/ViewControllers/SettingsViewController.m b/Limelight/ViewControllers/SettingsViewController.m index b7151623..76171858 100644 --- a/Limelight/ViewControllers/SettingsViewController.m +++ b/Limelight/ViewControllers/SettingsViewController.m @@ -452,6 +452,7 @@ BOOL isCustomResolution(CGSize res) { [self.hdrSelector setSelectedSegmentIndex:currentSettings.enableHdr ? 1 : 0]; } + [self.yuv444Selector setSelectedSegmentIndex:currentSettings.enableYUV444 ? 1 : 0]; [self.statsOverlaySelector setSelectedSegmentIndex:currentSettings.statsOverlayLevel.intValue]; [self.btMouseSelector setSelectedSegmentIndex:currentSettings.btMouseSupport ? 1 : 0]; [self.optimizeSettingsSelector setSelectedSegmentIndex:currentSettings.optimizeGames ? 1 : 0]; @@ -1062,6 +1063,7 @@ BOOL isCustomResolution(CGSize res) { BOOL swapABXYButtons = [self.swapABXYButtonsSelector selectedSegmentIndex] == 1; BOOL audioOnPC = [self.audioOnPCSelector selectedSegmentIndex] == 1; uint32_t preferredCodec = [self getChosenCodecPreference]; + BOOL enableYUV444 = [self.yuv444Selector selectedSegmentIndex] == 1; BOOL btMouseSupport = [self.btMouseSelector selectedSegmentIndex] == 1; BOOL useFramePacing = [self.framePacingSelector selectedSegmentIndex] == 1; // BOOL absoluteTouchMode = [self.touchModeSelector selectedSegmentIndex] == 1; @@ -1096,6 +1098,7 @@ BOOL isCustomResolution(CGSize res) { swapABXYButtons:swapABXYButtons audioOnPC:audioOnPC preferredCodec:preferredCodec + enableYUV444:enableYUV444 useFramePacing:useFramePacing enableHdr:enableHdr btMouseSupport:btMouseSupport