diff --git a/VoidLink/Input/CustomOSC/OSCProfilesManager.m b/VoidLink/Input/CustomOSC/OSCProfilesManager.m index 76803c72..ddc0ec75 100644 --- a/VoidLink/Input/CustomOSC/OSCProfilesManager.m +++ b/VoidLink/Input/CustomOSC/OSCProfilesManager.m @@ -165,13 +165,22 @@ static CGRect layoutViewBounds; - (void) importEncodedProfiles:(NSMutableArray* )profilesEncoded { NSMutableArray* targetProfiles = [_currentProfiles mutableCopy]; //_currentProfiles is availabled as long as getAllProfiles was called before calling this method (_currentProfiles avoids frequent accessing persisted data) - OSCProfile* profile; /* profile = [self findProfileByName:DEFAULT_TEMPLATE_NAME1 inProfileArray:targetProfiles]; if(profile && targetProfiles.count > 1) [targetProfiles removeObject:profile]; profile = [self findProfileByName:DEFAULT_TEMPLATE_NAME2 inProfileArray:targetProfiles]; if(profile && targetProfiles.count > 1) [targetProfiles removeObject:profile]; */ + + NSString *bundleId = [[NSBundle mainBundle] bundleIdentifier]; + bool importPencilProProfile = ([bundleId isEqualToString:@"com.voidlink.iOS"] + || [bundleId isEqualToString:@"com.voidlinkextreme.iOS"] + || [bundleId isEqualToString:@"com.voidlink.tf.debug10.iOS"]); + + if(!importPencilProProfile && [Utils isIPad]){ + [profilesEncoded removeObjectAtIndex:1]; + } + if(targetProfiles.count > 0) [targetProfiles removeObjectAtIndex:0]; NSMutableArray* localEncodedPofiles = [self encodedProfilesFromArray:targetProfiles]; [profilesEncoded addObjectsFromArray:localEncodedPofiles]; diff --git a/VoidLink/Input/OnScreenWidgetView.swift b/VoidLink/Input/OnScreenWidgetView.swift index 8a119d6d..596e160e 100644 --- a/VoidLink/Input/OnScreenWidgetView.swift +++ b/VoidLink/Input/OnScreenWidgetView.swift @@ -2475,7 +2475,12 @@ import SVGKit eraserShortcut = eraserShortcut.replacingOccurrences(of: "ERASER", with: "") self.functionalButtonDelegate?.replaceEraser(shortcut: eraserShortcut) case "PRESSURECURVE": - self.functionalButtonDelegate?.presentPressureCurveVC() + if ["com.voidlink.iOS" + , "com.voidlinkextreme.iOS" + , "com.voidlink.tf.debug10.iOS" + ].contains(Bundle.main.bundleIdentifier) && Utils.isIPad() { + self.functionalButtonDelegate?.presentPressureCurveVC() + } default: break } diff --git a/VoidLink/Utility/Utils.h b/VoidLink/Utility/Utils.h index 87dc4f1d..4f58de70 100644 --- a/VoidLink/Utility/Utils.h +++ b/VoidLink/Utility/Utils.h @@ -34,6 +34,7 @@ FOUNDATION_EXPORT NSString *const deviceName; + (bool)hdrSupported; + (bool)needUpdateDefaultSettings; + (BOOL)isIPhone; ++ (BOOL)isIPad; #if !TARGET_OS_TV + (void) launchUrl:(NSString*)urlString; diff --git a/VoidLink/Utility/Utils.m b/VoidLink/Utility/Utils.m index aac084df..d64b5803 100644 --- a/VoidLink/Utility/Utils.m +++ b/VoidLink/Utility/Utils.m @@ -157,7 +157,7 @@ NSString *const deviceName = @"roth"; + (bool)needUpdateDefaultSettings { // NSString *key = @"needUpdateDefaultSettings20260209"; - NSString *key = @"needUpdateDefaultSettings20260212"; + NSString *key = @"needUpdateDefaultSettings20260215"; BOOL updatedBefore = [[NSUserDefaults standardUserDefaults] boolForKey:key]; if (!updatedBefore) { @@ -172,6 +172,10 @@ NSString *const deviceName = @"roth"; return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone); } ++ (BOOL)isIPad{ + return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad); +} + @end @implementation NSString (NSStringWithTrim) diff --git a/VoidLink/ViewControllers/MainFrameViewController.m b/VoidLink/ViewControllers/MainFrameViewController.m index 9babbe02..fec23d2c 100644 --- a/VoidLink/ViewControllers/MainFrameViewController.m +++ b/VoidLink/ViewControllers/MainFrameViewController.m @@ -1595,9 +1595,13 @@ static NSMutableSet* hostList; settings.framePacingMode = @(FramePacingModeQueue); break; } + if([UIScreen mainScreen].maximumFramesPerSecond > 110) settings.asyncFrameDequeue = true; if([UIScreen mainScreen].maximumFramesPerSecond < 65) settings.asyncFrameDequeue = true; - settings.touchMoveEventInterval = [Utils isIPhone] ? @(30) : @(0); + + settings.touchMoveEventInterval = [Utils isIPhone] ? @(45) : @(0); + if([UIScreen mainScreen].maximumFramesPerSecond < 65) settings.touchMoveEventInterval = @(60); + [dataMan saveData]; } diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index b89e632b..08083d86 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -593,10 +593,6 @@ BOOL isCustomResolution(int resolutionSelected) { return [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone; } -- (BOOL)isIPad { - return [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad; -} - - (CGFloat)getStandardNavBarHeight{ return [self isIPhone] ? UINavigationBarHeightIPhone : UINavigationBarHeightIPad; } @@ -871,7 +867,7 @@ BOOL isCustomResolution(int resolutionSelected) { || [bundleId isEqualToString:@"com.voidlinkextreme.iOS"] || [bundleId isEqualToString:@"com.voidlink.tf.debug10.iOS"]); - if([self isIPad] && loadPencilSection){ + if([Utils isIPad] && loadPencilSection){ MenuSectionView* pencilSection = [[MenuSectionView alloc] init]; pencilSection.delegate = self; pencilSection.sectionTitle = [LocalizationHelper localizedStringForKey:@"Pencil"]; @@ -3505,7 +3501,7 @@ BOOL isCustomResolution(int resolutionSelected) { } - (void)loadPencilSettings:(TemporarySettings*) tempSettings{ - if([self isIPad]){ + if([Utils isIPad]){ self.pencilTickSelector.selectedSegmentIndex = tempSettings.pencilTickMode.intValue; [self.pencilTickSelector addTarget:self action:@selector(pencilTickModeChanged:) forControlEvents:UIControlEventValueChanged]; [self pencilTickModeChanged:self.pencilTickSelector]; @@ -3527,7 +3523,7 @@ BOOL isCustomResolution(int resolutionSelected) { } - (void)populatePencilSettings:(Settings*)currentSettings{ - if([self isIPad]){ + if([Utils isIPad]){ currentSettings.pencilTickMode = @(self.pencilTickSelector.selectedSegmentIndex); currentSettings.pencilTickIntervalUs = @(self.pencilTickIntervalSlider.value); }