Skip to content
Permalink
Browse files

Fix Unicode issues in SPU2-X with PortAudio.

  • Loading branch information...
micove committed Aug 7, 2015
1 parent 2c4cda1 commit 0e533e1630a0bd34619a0b57f8d162455b96a056
Showing with 5 additions and 5 deletions.
  1. +5 −5 plugins/spu2-x/src/SndOut_Portaudio.cpp
@@ -147,7 +147,7 @@ class Portaudio : public SndOutModule

if(apiinfo->type == m_ApiId)
{
if(m_Device == wxString::FromAscii(info->name))
if(m_Device == wxString::FromUTF8(info->name))
{
deviceIndex = i;
fprintf(stderr," (selected)");
@@ -386,9 +386,9 @@ class Portaudio : public SndOutModule
const PaDeviceInfo * info = Pa_GetDeviceInfo(j);
if(info->hostApi == api_idx && info->maxOutputChannels > 0)
{
SendMessageA(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_ADDSTRING,0,(LPARAM)info->name);
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_ADDSTRING,0,(LPARAM)wxString::FromUTF8(info->name).wc_str());
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETITEMDATA,i,(LPARAM)info);
if(wxString::FromAscii(info->name) == m_Device)
if(wxString::FromUTF8(info->name) == m_Device)
{
_idx = i;
}
@@ -429,7 +429,7 @@ class Portaudio : public SndOutModule
idx = (int)SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_GETCURSEL,0,0);
const PaDeviceInfo * info = (const PaDeviceInfo *)SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_GETITEMDATA,idx,0);
if(info)
m_Device = wxString::FromAscii( info->name );
m_Device = wxString::FromUTF8( info->name );
else
m_Device = L"default";

@@ -466,7 +466,7 @@ class Portaudio : public SndOutModule
const PaDeviceInfo * info = Pa_GetDeviceInfo(j);
if(info->hostApi == api_idx && info->maxOutputChannels > 0)
{
SendMessageA(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_ADDSTRING,0,(LPARAM)info->name);
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_ADDSTRING,0,(LPARAM)wxString::FromUTF8(info->name).wc_str());
SendMessage(GetDlgItem(hWnd,IDC_PA_DEVICE),CB_SETITEMDATA,i,(LPARAM)info);
i++;
}

0 comments on commit 0e533e1

Please sign in to comment.
You can’t perform that action at this time.