Modify the logic for saving resolution settings

This commit is contained in:
xzzpig committed 2024-11-19 09:48:23 +08:00
1 parent 978c50c271
commit 7699e47157
8 files changed
+89 -18

No files matched your search

+2 -1
View File
@@ -42,7 +42,8 @@
// absoluteTouchMode:(BOOL)absoluteTouchMode
touchMode:(NSInteger)touchMode
statsOverlay:(BOOL)statsOverlay
allowPortrait:(BOOL)allowPortrait;
allowPortrait:(BOOL)allowPortrait
resolutionSelected:(NSInteger)resolutionSelected;
- (NSArray*) getHosts;
- (void) updateHost:(TemporaryHost*)host;
+3 -1
View File
@@ -81,7 +81,8 @@
// absoluteTouchMode:(BOOL)absoluteTouchMode
touchMode:(NSInteger)touchMode
statsOverlay:(BOOL)statsOverlay
allowPortrait:(BOOL)allowPortrait{
allowPortrait:(BOOL)allowPortrait
resolutionSelected:(NSInteger)resolutionSelected {
[_managedObjectContext performBlockAndWait:^{
Settings* settingsToSave = [self retrieveSettings];
@@ -115,6 +116,7 @@
settingsToSave.touchMode = [NSNumber numberWithInteger:(uint16_t)touchMode];
settingsToSave.statsOverlay = statsOverlay;
settingsToSave.allowPortrait = allowPortrait;
settingsToSave.resolutionSelected = [NSNumber numberWithInteger:resolutionSelected];
[self saveData];
}];
+1
View File
@@ -33,6 +33,7 @@
@property (nonatomic, retain) NSNumber * mousePointerVelocityFactor;
@property (nonatomic, retain) NSNumber * pointerVelocityModeDivider;
@property (nonatomic, retain) NSString * uniqueId;
@property (nonatomic, retain) NSNumber * resolutionSelected;
@property (nonatomic) enum {
CODEC_PREF_AUTO,
CODEC_PREF_H264,
+1
View File
@@ -99,6 +99,7 @@
self.mousePointerVelocityFactor = settings.mousePointerVelocityFactor;
self.pointerVelocityModeDivider = settings.pointerVelocityModeDivider;
self.allowPortrait = settings.allowPortrait;
self.resolutionSelected = settings.resolutionSelected;
#endif
self.uniqueId = settings.uniqueId;