mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
fix extension check logic
This commit is contained in:
parent
42ff9d7fd0
commit
a9452ab198
1 changed files with 5 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "utils/log.hpp"
|
||||
#include "layer.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <lsfg.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
|
@ -51,7 +52,10 @@ std::vector<const char*> Utils::addExtensions(const char* const* extensions, siz
|
|||
std::copy_n(extensions, count, ext.data());
|
||||
|
||||
for (const auto& e : requiredExtensions) {
|
||||
auto it = std::ranges::find(ext, e);
|
||||
auto it = std::ranges::find_if(ext,
|
||||
[e](const char* extName) {
|
||||
return std::strcmp(extName, e) == 0;
|
||||
});
|
||||
if (it == ext.end()) {
|
||||
Log::debug("hooks-init", "Adding extension: {}", e);
|
||||
ext.push_back(e);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue