Skip to content

Commit 1281255

Browse files
committed
xrManagedApi: fix windows build
1 parent 277dab3 commit 1281255

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/editors/xrManagedApi/core/Core.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ void Core::Initialize(String ^ appName, LogCallback ^ logCallback, bool initFs,
2424
if (fsFileName)
2525
{
2626
std::string fsFileNameC = msclr::interop::marshal_as<std::string>(fsFileName);
27-
::Core.Initialize(appNameC.c_str(), ::LogCallback(LogCallbackWrapper, nullptr), initFs, fsFileNameC.c_str());
27+
::Core.Initialize(
28+
appNameC.c_str(), nullptr ,::LogCallback(LogCallbackWrapper, nullptr), initFs, fsFileNameC.c_str());
2829
}
2930
else
30-
::Core.Initialize(appNameC.c_str(), ::LogCallback(LogCallbackWrapper, nullptr), initFs, nullptr);
31+
::Core.Initialize(appNameC.c_str(), nullptr, ::LogCallback(LogCallbackWrapper, nullptr), initFs, nullptr);
3132
}
3233

3334
void Core::Initialize(String ^ appName, LogCallback ^ logCallback, bool initFs)

src/xrCore/xrCore.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,10 @@ void xrCore::Initialize(pcstr _ApplicationName, pcstr commandLine, LogCallback c
193193
PluginMode = plugin;
194194
// Init COM so we can use CoCreateInstance
195195
// HRESULT co_res =
196-
197-
Params = xr_strdup (commandLine);
196+
if (commandLine)
197+
Params = xr_strdup (commandLine);
198+
else
199+
Params = xr_strdup("");
198200

199201
#if defined(WINDOWS)
200202
if (!strstr(Params, "-weather"))

0 commit comments

Comments
 (0)