From 5cf9d3abf7d7f6debbab1e491313249b805bd2f3 Mon Sep 17 00:00:00 2001 From: Sven Liedtke Date: Sat, 1 Apr 2023 01:02:21 +0200 Subject: [PATCH 1/2] std::getenv is not supported using uwp --- code/Common/ImporterRegistry.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/Common/ImporterRegistry.cpp b/code/Common/ImporterRegistry.cpp index 78c02d96d..ac4f5e544 100644 --- a/code/Common/ImporterRegistry.cpp +++ b/code/Common/ImporterRegistry.cpp @@ -214,7 +214,12 @@ void GetImporterInstanceList(std::vector &out) { // Some importers may be unimplemented or otherwise unsuitable for general use // in their current state. Devs can set ASSIMP_ENABLE_DEV_IMPORTERS in their // local environment to enable them, otherwise they're left out of the registry. +#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP + // not supported under uwp const char *envStr = std::getenv("ASSIMP_ENABLE_DEV_IMPORTERS"); +#else + const char *envStr = { "0" }; +#endif bool devImportersEnabled = envStr && strcmp(envStr, "0"); // Ensure no unused var warnings if all uses are #ifndef'd away below: @@ -378,7 +383,7 @@ void GetImporterInstanceList(std::vector &out) { out.push_back(new IQMImporter()); #endif //#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER - // out.push_back(new StepFile::StepFileImporter()); + // out.push_back(new StepFile::StepFileImporter()); //#endif } From e6f26fc52e93979a999ebf3b1ed083cc9006e294 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 4 Apr 2023 12:54:26 +0200 Subject: [PATCH 2/2] Remove dead code. --- code/Common/ImporterRegistry.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/Common/ImporterRegistry.cpp b/code/Common/ImporterRegistry.cpp index ac4f5e544..c67fee936 100644 --- a/code/Common/ImporterRegistry.cpp +++ b/code/Common/ImporterRegistry.cpp @@ -382,9 +382,6 @@ void GetImporterInstanceList(std::vector &out) { #ifndef ASSIMP_BUILD_NO_IQM_IMPORTER out.push_back(new IQMImporter()); #endif - //#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER - // out.push_back(new StepFile::StepFileImporter()); - //#endif } /** will delete all registered importers. */