Skip to content

Commit 7a5b831

Browse files
authored
Tidy up BabylonNative.cpp
1 parent ad6f264 commit 7a5b831

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Modules/@babylonjs/react-native/shared/BabylonNative.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ namespace BabylonNative
5050
Babylon::JsRuntime::CreateForJavaScript(m_env, Babylon::CreateJsRuntimeDispatcher(m_env, jsiRuntime, m_jsDispatcher, m_isRunning));
5151

5252
// Initialize Babylon Native plugins
53-
#ifndef TARGET_OS_OSX
53+
#ifndef TARGET_OS_OSX
5454
m_nativeXr.emplace(Babylon::Plugins::NativeXr::Initialize(m_env));
5555
m_nativeXr->SetSessionStateChangedCallback([isXRActive{ m_isXRActive }](bool isSessionActive) { *isXRActive = isSessionActive; });
56-
#endif
56+
#endif
5757
Babylon::Plugins::NativeCapture::Initialize(m_env);
5858
m_nativeInput = &Babylon::Plugins::NativeInput::CreateForJavaScript(m_env);
5959
Babylon::Plugins::NativeOptimizations::Initialize(m_env);
@@ -82,9 +82,9 @@ namespace BabylonNative
8282
m_graphicsConfig.Window = window;
8383
m_graphicsConfig.Width = width;
8484
m_graphicsConfig.Height = height;
85-
#ifdef TARGET_OS_OSX
85+
#ifdef TARGET_OS_OSX
8686
[[[NSApp mainWindow] contentView] addSubview:window];
87-
#endif
87+
#endif
8888
UpdateGraphicsConfiguration();
8989
}
9090

@@ -162,12 +162,12 @@ namespace BabylonNative
162162

163163
void Initialize()
164164
{
165-
#ifdef TARGET_OS_OSX
166-
id<MTLDevice> dev = MTLCreateSystemDefaultDevice();
167-
MTKView *mv = [[MTKView alloc] initWithFrame:[[NSApp mainWindow] frame] device:dev];
168-
m_graphicsConfig.Device = dev;
169-
m_graphicsConfig.Window = mv;
170-
#endif
165+
#ifdef TARGET_OS_OSX
166+
id<MTLDevice> dev = MTLCreateSystemDefaultDevice();
167+
MTKView *mv = [[MTKView alloc] initWithFrame:[[NSApp mainWindow] frame] device:dev];
168+
m_graphicsConfig.Device = dev;
169+
m_graphicsConfig.Window = mv;
170+
#endif
171171
m_newEngine = true;
172172
}
173173

@@ -221,14 +221,14 @@ namespace BabylonNative
221221
return *m_isXRActive;
222222
}
223223

224-
#if defined(__APPLE__) || defined(ANDROID)
224+
#if defined(__APPLE__) || defined(ANDROID)
225225
void UpdateXRView(WindowType window)
226226
{
227-
#ifndef TARGET_OS_OSX
227+
#ifndef TARGET_OS_OSX
228228
m_nativeXr->UpdateWindow(window);
229-
#endif
229+
#endif
230230
}
231-
#endif
231+
#endif
232232

233233
jsi::Value get(jsi::Runtime& runtime, const jsi::PropNameID& prop) override
234234
{
@@ -416,7 +416,7 @@ namespace BabylonNative
416416
return false;
417417
}
418418

419-
#if defined(__APPLE__) || defined(ANDROID)
419+
#if defined(__APPLE__) || defined(ANDROID)
420420
void UpdateXRView(WindowType window)
421421
{
422422
#ifndef TARGET_OS_OSX
@@ -426,5 +426,5 @@ namespace BabylonNative
426426
}
427427
#endif
428428
}
429-
#endif
429+
#endif
430430
}

0 commit comments

Comments
 (0)