mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix multiple missing UTF-8 decoding.
This commit is contained in:
@@ -540,7 +540,7 @@ Array AudioDriverCoreAudio::_get_device_list(bool capture) {
|
||||
ERR_FAIL_NULL_V_MSG(buffer, list, "Out of memory.");
|
||||
if (CFStringGetCString(cfname, buffer, maxSize, kCFStringEncodingUTF8)) {
|
||||
// Append the ID to the name in case we have devices with duplicate name
|
||||
list.push_back(String(buffer) + " (" + itos(audioDevices[i]) + ")");
|
||||
list.push_back(String::utf8(buffer) + " (" + itos(audioDevices[i]) + ")");
|
||||
}
|
||||
|
||||
memfree(buffer);
|
||||
@@ -597,7 +597,7 @@ void AudioDriverCoreAudio::_set_device(const String &device, bool capture) {
|
||||
char *buffer = (char *)memalloc(maxSize);
|
||||
ERR_FAIL_NULL_MSG(buffer, "Out of memory.");
|
||||
if (CFStringGetCString(cfname, buffer, maxSize, kCFStringEncodingUTF8)) {
|
||||
String name = String(buffer) + " (" + itos(audioDevices[i]) + ")";
|
||||
String name = String::utf8(buffer) + " (" + itos(audioDevices[i]) + ")";
|
||||
if (name == device) {
|
||||
deviceId = audioDevices[i];
|
||||
found = true;
|
||||
|
||||
Reference in New Issue
Block a user