diff --git a/rpcs3/rpcs3qt/microphone_creator.cpp b/rpcs3/rpcs3qt/microphone_creator.cpp index 41427cf6f1..1458f83ef2 100644 --- a/rpcs3/rpcs3qt/microphone_creator.cpp +++ b/rpcs3/rpcs3qt/microphone_creator.cpp @@ -1,3 +1,4 @@ +#include "stdafx.h" #include "microphone_creator.h" #include "Utilities/StrFmt.h" @@ -5,7 +6,7 @@ #include "3rdparty/OpenAL/include/alext.h" -constexpr auto qstr = QString::fromStdString; +LOG_CHANNEL(cfg_log, "CFG"); microphone_creator::microphone_creator() { @@ -25,11 +26,11 @@ void microphone_creator::refresh_list() if (alcIsExtensionPresent(nullptr, "ALC_ENUMERATION_EXT") == AL_TRUE) { - if (const char* devices = alcGetString(nullptr, ALC_CAPTURE_DEVICE_SPECIFIER); devices != nullptr) + if (const char* devices = alcGetString(nullptr, ALC_CAPTURE_DEVICE_SPECIFIER)) { while (*devices != 0) { - m_microphone_list.append(qstr(devices)); + m_microphone_list.append(devices); devices += strlen(devices) + 1; } } @@ -37,9 +38,11 @@ void microphone_creator::refresh_list() else { // Without enumeration we can only use one device - if (const char* device = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER); device != nullptr) + cfg_log.error("OpenAl extension ALC_ENUMERATION_EXT not supported. The microphone list will only contain the default microphone."); + + if (const char* device = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER)) { - m_microphone_list.append(qstr(device)); + m_microphone_list.append(device); } } }