Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0b7cb56 authored by Michael Lentine's avatar Michael Lentine Committed by Jesse Hall
Browse files

Activate layers when the strings match.

Change-Id: I7bf6ba2bfe215b2dad671b3996f421313d72d3a2
(cherry picked from commit 90c828766ae8d560ed254fd434ad872cd6b21eb0)
parent f3339223
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -14,6 +14,8 @@
 * limitations under the License.
 * limitations under the License.
 */
 */


// #define LOG_NDEBUG 0

#include "loader.h"
#include "loader.h"
#include <alloca.h>
#include <alloca.h>
#include <dirent.h>
#include <dirent.h>
@@ -316,7 +318,7 @@ void GetLayerExtensions(const std::vector<Layer>& layers,


LayerRef GetLayerRef(std::vector<Layer>& layers, const char* name) {
LayerRef GetLayerRef(std::vector<Layer>& layers, const char* name) {
    for (uint32_t id = 0; id < layers.size(); id++) {
    for (uint32_t id = 0; id < layers.size(); id++) {
        if (strcmp(name, layers[id].properties.layerName) != 0) {
        if (strcmp(name, layers[id].properties.layerName) == 0) {
            LayerLibrary& library = g_layer_libraries[layers[id].library_idx];
            LayerLibrary& library = g_layer_libraries[layers[id].library_idx];
            std::lock_guard<std::mutex> lock(g_library_mutex);
            std::lock_guard<std::mutex> lock(g_library_mutex);
            if (library.refcount++ == 0) {
            if (library.refcount++ == 0) {