Browse Source

Small fix for audio device name display.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
9d5954c08d
2 changed files with 14 additions and 18 deletions
  1. +7
    -9
      juce_amalgamated.cpp
  2. +7
    -9
      src/gui/components/special/juce_AudioDeviceSelectorComponent.cpp

+ 7
- 9
juce_amalgamated.cpp View File

@@ -71814,18 +71814,16 @@ public:

for (int i = 0; i < items.size(); i += 2)
{
String name (items[i]);
String name2 (items[i + 1]);

const String name (items[i]);
const String name2 (items[i + 1]);
String commonBit;

for (int j = 0; j < name.length(); ++j)
if (name.substring (0, j).equalsIgnoreCase (name2.substring (0, j)))
commonBit = name.substring (0, j);
if (! CharacterFunctions::isDigit (name[0]))
for (int j = 0; j < name.length(); ++j)
if (name.substring (0, j).equalsIgnoreCase (name2.substring (0, j)))
commonBit = name.substring (0, j);

pairs.add (name.trim()
+ " + "
+ name2.substring (commonBit.length()).trim());
pairs.add (name.trim() + " + " + name2.substring (commonBit.length()).trim());
}

items = pairs;


+ 7
- 9
src/gui/components/special/juce_AudioDeviceSelectorComponent.cpp View File

@@ -726,18 +726,16 @@ public:
for (int i = 0; i < items.size(); i += 2)
{
String name (items[i]);
String name2 (items[i + 1]);
const String name (items[i]);
const String name2 (items[i + 1]);
String commonBit;
for (int j = 0; j < name.length(); ++j)
if (name.substring (0, j).equalsIgnoreCase (name2.substring (0, j)))
commonBit = name.substring (0, j);
if (! CharacterFunctions::isDigit (name[0]))
for (int j = 0; j < name.length(); ++j)
if (name.substring (0, j).equalsIgnoreCase (name2.substring (0, j)))
commonBit = name.substring (0, j);
pairs.add (name.trim()
+ " + "
+ name2.substring (commonBit.length()).trim());
pairs.add (name.trim() + " + " + name2.substring (commonBit.length()).trim());
}
items = pairs;


Loading…
Cancel
Save