summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/ipa_manager.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 4ffbdd71..7f0a5d58 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -98,31 +98,31 @@ IPAManager::IPAManager()
unsigned int ipaCount = 0;
int ret;
- ret = addDir(IPA_MODULE_DIR);
- if (ret > 0)
- ipaCount += ret;
-
+ /* User-specified paths take precedence. */
const char *modulePaths = utils::secure_getenv("LIBCAMERA_IPA_MODULE_PATH");
- if (!modulePaths) {
+ if (modulePaths) {
+ for (const auto &dir : utils::split(modulePaths, ":")) {
+ if (dir.empty())
+ continue;
+
+ int ret = addDir(dir.c_str());
+ if (ret > 0)
+ ipaCount += ret;
+ }
+
if (!ipaCount)
LOG(IPAManager, Warning)
- << "No IPA found in '" IPA_MODULE_DIR "'";
- return;
+ << "No IPA found in '" << modulePaths << "'";
}
- for (const auto &dir : utils::split(modulePaths, ":")) {
- if (dir.empty())
- continue;
-
- int ret = addDir(dir.c_str());
- if (ret > 0)
- ipaCount += ret;
- }
+ /* Load IPAs from the installed system path. */
+ ret = addDir(IPA_MODULE_DIR);
+ if (ret > 0)
+ ipaCount += ret;
if (!ipaCount)
LOG(IPAManager, Warning)
- << "No IPA found in '" IPA_MODULE_DIR "' and '"
- << modulePaths << "'";
+ << "No IPA found in '" IPA_MODULE_DIR "'";
}
IPAManager::~IPAManager()