From e45014b9a04d2a7c114240f3d33480348995041f Mon Sep 17 00:00:00 2001 From: Jan Herling Date: Wed, 8 Jan 2025 16:41:13 -0800 Subject: [PATCH] Minor fix in AKDevice Summary: Using the function parameter instead of always using the suppored video formats of WorldTracking Reviewed By: enpe Differential Revision: D67956294 fbshipit-source-id: 9f1bc25dfa2def83fc38f480c7309788f39274e4 --- impl/ocean/devices/arkit/AKDevice.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/impl/ocean/devices/arkit/AKDevice.mm b/impl/ocean/devices/arkit/AKDevice.mm index 8c5ccab6..b5c2b8cc 100644 --- a/impl/ocean/devices/arkit/AKDevice.mm +++ b/impl/ocean/devices/arkit/AKDevice.mm @@ -736,14 +736,14 @@ - (void)session:(ARSession *)session didRemoveAnchors:(NSArray<__kindof ARAnchor } } -+ (ARVideoFormat*)determinePreferredVideoFormat:(NSArray *)supportedVideoFormats withWidth:(unsigned int)preferredWidth withHeight:(unsigned int)preferredHeight withFps:(float)preferredFps withHDR:(int)preferredHDR ++ (ARVideoFormat*)determinePreferredVideoFormat:(NSArray*)supportedVideoFormats withWidth:(unsigned int)preferredWidth withHeight:(unsigned int)preferredHeight withFps:(float)preferredFps withHDR:(int)preferredHDR { #ifdef OCEAN_DEBUG Log::debug() << "Supported video formats for tracker:"; - for (size_t n = 0; n < ARWorldTrackingConfiguration.supportedVideoFormats.count; ++n) + for (size_t n = 0; n < supportedVideoFormats.count; ++n) { - ARVideoFormat* videoFormat = ARWorldTrackingConfiguration.supportedVideoFormats[n]; + ARVideoFormat* videoFormat = supportedVideoFormats[n]; if (@available(iOS 16.0, *)) { @@ -782,9 +782,9 @@ + (ARVideoFormat*)determinePreferredVideoFormat:(NSArray *)supp while (result == nullptr) { - for (size_t n = 0; n < ARWorldTrackingConfiguration.supportedVideoFormats.count; ++n) + for (size_t n = 0; n < supportedVideoFormats.count; ++n) { - ARVideoFormat* videoFormat = ARWorldTrackingConfiguration.supportedVideoFormats[n]; + ARVideoFormat* videoFormat = supportedVideoFormats[n]; if (bestResolutionError < 0.0) {