winealsa.drv: Use CP_UNIXCP instead of CP_ACP for strings obtained from native OS functions.
This commit is contained in:
parent
bce9cd38b0
commit
a7e1753d7b
|
@ -1158,7 +1158,7 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
|
|||
lstrcpynA(midiPortName, snd_seq_port_info_get_name(pinfo), MAXPNAMELEN-1);
|
||||
midiPortName[MAXPNAMELEN-1] = 0;
|
||||
}
|
||||
MultiByteToWideChar(CP_ACP, 0, midiPortName, -1,
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, midiPortName, -1,
|
||||
MidiOutDev[MODM_NumDevs].caps.szPname,
|
||||
sizeof(MidiOutDev[MODM_NumDevs].caps.szPname) / sizeof(WCHAR));
|
||||
|
||||
|
@ -1223,7 +1223,7 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
|
|||
lstrcpynA(midiPortName, snd_seq_port_info_get_name(pinfo), MAXPNAMELEN-1);
|
||||
midiPortName[MAXPNAMELEN-1] = 0;
|
||||
}
|
||||
MultiByteToWideChar(CP_ACP, 0, midiPortName, -1,
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, midiPortName, -1,
|
||||
MidiInDev[MIDM_NumDevs].caps.szPname,
|
||||
sizeof(MidiInDev[MIDM_NumDevs].caps.szPname) / sizeof(WCHAR));
|
||||
MidiInDev[MIDM_NumDevs].state = 0;
|
||||
|
|
|
@ -719,7 +719,7 @@ static DWORD widDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
|
|||
{
|
||||
TRACE("(%u, %p)\n", wDevID, dwParam1);
|
||||
|
||||
*dwParam1 = MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1,
|
||||
*dwParam1 = MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1,
|
||||
NULL, 0 ) * sizeof(WCHAR);
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
@ -729,10 +729,10 @@ static DWORD widDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
|
|||
*/
|
||||
static DWORD widDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2)
|
||||
{
|
||||
if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1,
|
||||
if (dwParam2 >= MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1,
|
||||
NULL, 0 ) * sizeof(WCHAR))
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1,
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].interface_name, -1,
|
||||
dwParam1, dwParam2 / sizeof(WCHAR));
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
|
|
@ -490,7 +490,7 @@ static int ALSA_AddPlaybackDevice(snd_ctl_t *ctl, snd_pcm_t *pcm, const char *pc
|
|||
if (rc)
|
||||
return(rc);
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, wwo.ds_desc.szDesc, -1,
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, wwo.ds_desc.szDesc, -1,
|
||||
wwo.outcaps.szPname, sizeof(wwo.outcaps.szPname)/sizeof(WCHAR));
|
||||
wwo.outcaps.szPname[sizeof(wwo.outcaps.szPname)/sizeof(WCHAR) - 1] = '\0';
|
||||
|
||||
|
@ -530,7 +530,7 @@ static int ALSA_AddCaptureDevice(snd_ctl_t *ctl, snd_pcm_t *pcm, const char *pcm
|
|||
if (rc)
|
||||
return(rc);
|
||||
|
||||
MultiByteToWideChar(CP_ACP, 0, wwi.ds_desc.szDesc, -1,
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, wwi.ds_desc.szDesc, -1,
|
||||
wwi.incaps.szPname, sizeof(wwi.incaps.szPname) / sizeof(WCHAR));
|
||||
wwi.incaps.szPname[sizeof(wwi.incaps.szPname)/sizeof(WCHAR) - 1] = '\0';
|
||||
|
||||
|
|
|
@ -1131,7 +1131,7 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
|
|||
{
|
||||
TRACE("(%u, %p)\n", wDevID, dwParam1);
|
||||
|
||||
*dwParam1 = MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].interface_name, -1,
|
||||
*dwParam1 = MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].interface_name, -1,
|
||||
NULL, 0 ) * sizeof(WCHAR);
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
@ -1141,10 +1141,10 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
|
|||
*/
|
||||
static DWORD wodDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2)
|
||||
{
|
||||
if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].interface_name, -1,
|
||||
if (dwParam2 >= MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].interface_name, -1,
|
||||
NULL, 0 ) * sizeof(WCHAR))
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].interface_name, -1,
|
||||
MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].interface_name, -1,
|
||||
dwParam1, dwParam2 / sizeof(WCHAR));
|
||||
return MMSYSERR_NOERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue