mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-15 21:21:45 +00:00
feat: added settings bundle
This commit is contained in:
@@ -15,18 +15,57 @@
|
|||||||
|
|
||||||
self.parent = settings;
|
self.parent = settings;
|
||||||
|
|
||||||
|
#if TARGET_OS_TV
|
||||||
|
NSInteger _bitrate = [[NSUserDefaults standardUserDefaults] integerForKey:@"bitrate"];
|
||||||
|
NSInteger _framerate = [[NSUserDefaults standardUserDefaults] integerForKey:@"framerate"];
|
||||||
|
|
||||||
|
if (_bitrate) {
|
||||||
|
self.bitrate = [NSNumber numberWithInteger:_bitrate];
|
||||||
|
} else {
|
||||||
|
self.bitrate = [NSNumber numberWithInteger:20000];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_framerate) {
|
||||||
|
self.framerate = [NSNumber numberWithInteger:_framerate];
|
||||||
|
} else {
|
||||||
|
self.framerate = [NSNumber numberWithInteger:60];
|
||||||
|
}
|
||||||
|
|
||||||
|
self.useHevc = [[NSUserDefaults standardUserDefaults] boolForKey:@"useHevc"] || NO;
|
||||||
|
self.playAudioOnPC = [[NSUserDefaults standardUserDefaults] boolForKey:@"audioOnPC"] || NO;
|
||||||
|
self.enableHdr = [[NSUserDefaults standardUserDefaults] boolForKey:@"enableHdr"] || NO;
|
||||||
|
self.optimizeGames = [[NSUserDefaults standardUserDefaults] boolForKey:@"optimizeGames"] || YES;
|
||||||
|
self.multiController = YES;
|
||||||
|
NSInteger _screenSize = [[NSUserDefaults standardUserDefaults] integerForKey:@"streamResolution"];
|
||||||
|
switch (_screenSize) {
|
||||||
|
case 0:
|
||||||
|
self.height = [NSNumber numberWithInteger:720];
|
||||||
|
self.width = [NSNumber numberWithInteger:1280];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
self.height = [NSNumber numberWithInteger:2160];
|
||||||
|
self.width = [NSNumber numberWithInteger:3840];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
default:
|
||||||
|
self.height = [NSNumber numberWithInteger:1080];
|
||||||
|
self.width = [NSNumber numberWithInteger:1920];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#else
|
||||||
self.bitrate = settings.bitrate;
|
self.bitrate = settings.bitrate;
|
||||||
self.framerate = settings.framerate;
|
self.framerate = settings.framerate;
|
||||||
self.height = settings.height;
|
self.height = settings.height;
|
||||||
self.width = settings.width;
|
self.width = settings.width;
|
||||||
self.onscreenControls = settings.onscreenControls;
|
|
||||||
self.uniqueId = settings.uniqueId;
|
|
||||||
self.streamingRemotely = settings.streamingRemotely;
|
|
||||||
self.useHevc = settings.useHevc;
|
self.useHevc = settings.useHevc;
|
||||||
self.multiController = settings.multiController;
|
|
||||||
self.playAudioOnPC = settings.playAudioOnPC;
|
self.playAudioOnPC = settings.playAudioOnPC;
|
||||||
self.enableHdr = settings.enableHdr;
|
self.enableHdr = settings.enableHdr;
|
||||||
self.optimizeGames = settings.optimizeGames;
|
self.optimizeGames = settings.optimizeGames;
|
||||||
|
self.multiController = settings.multiController;
|
||||||
|
#endif
|
||||||
|
self.onscreenControls = settings.onscreenControls;
|
||||||
|
self.uniqueId = settings.uniqueId;
|
||||||
|
self.streamingRemotely = settings.streamingRemotely;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,143 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>StringsTable</key>
|
||||||
|
<string>Root</string>
|
||||||
|
<key>PreferenceSpecifiers</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSGroupSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Host Configuration</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSToggleSwitchSpecifier</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<false/>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Play Audio on Host PC</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>audioOnPC</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>TrueValue</key>
|
||||||
|
<string>Optimize Games</string>
|
||||||
|
<key>FalseValue</key>
|
||||||
|
<string>Off</string>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSToggleSwitchSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Optimize Games</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>optimizeGames</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSToggleSwitchSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>HEVC Video</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>useHevc</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSToggleSwitchSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Enable HDR</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>enableHdr</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSGroupSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Stream Configuration</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSMultiValueSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Stream Resolution</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>streamResolution</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>Values</key>
|
||||||
|
<array>
|
||||||
|
<string>0</string>
|
||||||
|
<string>1</string>
|
||||||
|
<string>2</string>
|
||||||
|
</array>
|
||||||
|
<key>Titles</key>
|
||||||
|
<array>
|
||||||
|
<string>720p</string>
|
||||||
|
<string>1080p</string>
|
||||||
|
<string>4K</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSMultiValueSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Frame Rate</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>framerate</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<string>60</string>
|
||||||
|
<key>Values</key>
|
||||||
|
<array>
|
||||||
|
<string>30</string>
|
||||||
|
<string>60</string>
|
||||||
|
</array>
|
||||||
|
<key>Titles</key>
|
||||||
|
<array>
|
||||||
|
<string>30 FPS</string>
|
||||||
|
<string>60 FPS</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>PSMultiValueSpecifier</string>
|
||||||
|
<key>Title</key>
|
||||||
|
<string>Bitrate</string>
|
||||||
|
<key>Key</key>
|
||||||
|
<string>bitrate</string>
|
||||||
|
<key>DefaultValue</key>
|
||||||
|
<string>10000</string>
|
||||||
|
<key>Titles</key>
|
||||||
|
<array>
|
||||||
|
<string>0.5 Mbps</string>
|
||||||
|
<string>1 Mbps</string>
|
||||||
|
<string>2 Mbps</string>
|
||||||
|
<string>5 Mbps</string>
|
||||||
|
<string>10 Mbps</string>
|
||||||
|
<string>20 Mbps</string>
|
||||||
|
<string>25 Mbps</string>
|
||||||
|
<string>50 Mbps</string>
|
||||||
|
<string>100 Mbps</string>
|
||||||
|
</array>
|
||||||
|
<key>Values</key>
|
||||||
|
<array>
|
||||||
|
<string>500</string>
|
||||||
|
<string>1000</string>
|
||||||
|
<string>2000</string>
|
||||||
|
<string>5000</string>
|
||||||
|
<string>10000</string>
|
||||||
|
<string>20000</string>
|
||||||
|
<string>25000</string>
|
||||||
|
<string>50000</string>
|
||||||
|
<string>100000</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
Binary file not shown.
@@ -7,6 +7,7 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
693B3A9B218638CD00982F7B /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 693B3A9A218638CD00982F7B /* Settings.bundle */; };
|
||||||
9832D1361BBCD5C50036EF48 /* TemporaryApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9832D1351BBCD5C50036EF48 /* TemporaryApp.m */; };
|
9832D1361BBCD5C50036EF48 /* TemporaryApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9832D1351BBCD5C50036EF48 /* TemporaryApp.m */; };
|
||||||
9865DC30213260B40005B9B9 /* libmoonlight-common-tv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB1A68152132509400507771 /* libmoonlight-common-tv.a */; };
|
9865DC30213260B40005B9B9 /* libmoonlight-common-tv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB1A68152132509400507771 /* libmoonlight-common-tv.a */; };
|
||||||
9865DC31213260F10005B9B9 /* mkcert.c in Sources */ = {isa = PBXBuildFile; fileRef = FB89460719F646E200339C8A /* mkcert.c */; };
|
9865DC31213260F10005B9B9 /* mkcert.c in Sources */ = {isa = PBXBuildFile; fileRef = FB89460719F646E200339C8A /* mkcert.c */; };
|
||||||
@@ -160,6 +161,7 @@
|
|||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
693B3A9A218638CD00982F7B /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
|
||||||
98132E8C20BC9A62007A053F /* Moonlight v1.1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.1.xcdatamodel"; sourceTree = "<group>"; };
|
98132E8C20BC9A62007A053F /* Moonlight v1.1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.1.xcdatamodel"; sourceTree = "<group>"; };
|
||||||
9832D1341BBCD5C50036EF48 /* TemporaryApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemporaryApp.h; path = Database/TemporaryApp.h; sourceTree = "<group>"; };
|
9832D1341BBCD5C50036EF48 /* TemporaryApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemporaryApp.h; path = Database/TemporaryApp.h; sourceTree = "<group>"; };
|
||||||
9832D1351BBCD5C50036EF48 /* TemporaryApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TemporaryApp.m; path = Database/TemporaryApp.m; sourceTree = "<group>"; };
|
9832D1351BBCD5C50036EF48 /* TemporaryApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TemporaryApp.m; path = Database/TemporaryApp.m; sourceTree = "<group>"; };
|
||||||
@@ -440,6 +442,7 @@
|
|||||||
FB1A67612132419A00507771 /* Assets.xcassets */,
|
FB1A67612132419A00507771 /* Assets.xcassets */,
|
||||||
FB1A67632132419A00507771 /* Info.plist */,
|
FB1A67632132419A00507771 /* Info.plist */,
|
||||||
FB1A67642132419A00507771 /* main.m */,
|
FB1A67642132419A00507771 /* main.m */,
|
||||||
|
693B3A9A218638CD00982F7B /* Settings.bundle */,
|
||||||
);
|
);
|
||||||
path = "Moonlight TV";
|
path = "Moonlight TV";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -968,6 +971,7 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
693B3A9B218638CD00982F7B /* Settings.bundle in Resources */,
|
||||||
FB1A681E21328A1B00507771 /* Images.xcassets in Resources */,
|
FB1A681E21328A1B00507771 /* Images.xcassets in Resources */,
|
||||||
FB1A67622132419A00507771 /* Assets.xcassets in Resources */,
|
FB1A67622132419A00507771 /* Assets.xcassets in Resources */,
|
||||||
FB1A67602132419700507771 /* Main.storyboard in Resources */,
|
FB1A67602132419700507771 /* Main.storyboard in Resources */,
|
||||||
|
|||||||
Reference in New Issue
Block a user