1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix utf8 audio device specifier names on windows

This commit is contained in:
derMart 2015-01-12 16:10:12 +01:00
parent 94db81d720
commit 3a107e33c8

View File

@ -140,7 +140,11 @@ void AVForm::getAudioInDevices()
while (*pDeviceList)
{
int len = strlen(pDeviceList);
QString inDev = QString::fromLocal8Bit(pDeviceList,len);
#ifdef Q_OS_WIN32
QString inDev = QString::fromUtf8(pDeviceList,len);
#else
QString inDev = QString::fromLocal8Bit(pDeviceList,len);
#endif
bodyUI->inDevCombobox->addItem(inDev);
if (settingsInDev == inDev)
{
@ -170,7 +174,11 @@ void AVForm::getAudioOutDevices()
while (*pDeviceList)
{
int len = strlen(pDeviceList);
QString outDev = QString::fromLocal8Bit(pDeviceList,len);
#ifdef Q_OS_WIN32
QString outDev = QString::fromUtf8(pDeviceList,len);
#else
QString outDev = QString::fromLocal8Bit(pDeviceList,len);
#endif
bodyUI->outDevCombobox->addItem(outDev);
if (settingsOutDev == outDev)
{