Browse Source

Small tweak to how DSSI UIs are found, to be more inclusive

Signed-off-by: falkTX <falktx@gmail.com>
tags/v2.1-alpha1-winvst
falkTX 5 years ago
parent
commit
07e876a743
Signed by: falkTX <falktx@gmail.com> GPG Key ID: 2D3445A829213837
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      source/utils/CarlaDssiUtils.cpp

+ 11
- 3
source/utils/CarlaDssiUtils.cpp View File

@@ -1,6 +1,6 @@
/* /*
* Carla DSSI utils * Carla DSSI utils
* Copyright (C) 2013-2017 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2013-2018 Filipe Coelho <falktx@falktx.com>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -36,8 +36,16 @@ const char* find_dssi_ui(const char* const filename, const char* const label) no
String checkLabel(label); String checkLabel(label);
String checkSName(File(pluginDir).getFileName()); String checkSName(File(pluginDir).getFileName());


if (! checkLabel.endsWith("_")) checkLabel += "_";
if (! checkSName.endsWith("_")) checkSName += "_";
if (checkSName.endsWithIgnoreCase("dssi"))
{
checkSName = checkSName.dropLastCharacters(4);

if (checkSName.endsWithChar('-'))
checkSName = checkSName.dropLastCharacters(1);
}

if (! checkLabel.endsWithChar('_')) checkLabel += "_";
if (! checkSName.endsWithChar('_')) checkSName += "_";


Array<File> results; Array<File> results;




Loading…
Cancel
Save