summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-06 14:46:48 +0100
committerGitHub <noreply@github.com>2022-01-06 14:46:48 +0100
commit84d82030c35017c7470d3373257437ee022024ae (patch)
tree015cc8a3b1c889245462f54879a74d469d777928 /drivers
parent985ae61ddaa33f45a0dcc70bd1e9de7150e2216e (diff)
parentc69e0d16bc8adbe3d984f4f9953412986ed02791 (diff)
Merge pull request #56549 from bruvzg/utf8_fixes
Diffstat (limited to 'drivers')
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp4
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp
index 9cf2b7a7eb..7884269103 100644
--- a/drivers/alsa/audio_driver_alsa.cpp
+++ b/drivers/alsa/audio_driver_alsa.cpp
@@ -283,9 +283,9 @@ Array AudioDriverALSA::get_device_list() {
if (name != nullptr && !strncmp(name, "plughw", 6)) {
if (desc) {
- list.push_back(String(name) + ";" + String(desc));
+ list.push_back(String::utf8(name) + ";" + String::utf8(desc));
} else {
- list.push_back(String(name));
+ list.push_back(String::utf8(name));
}
}
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp
index 7364dbe2e7..e37a53fede 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.cpp
+++ b/drivers/coreaudio/audio_driver_coreaudio.cpp
@@ -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;