diff --git a/dlls/wineoss.drv/audio.c b/dlls/wineoss.drv/audio.c index f5125103d2e..bdbfa2b5b1f 100644 --- a/dlls/wineoss.drv/audio.c +++ b/dlls/wineoss.drv/audio.c @@ -183,17 +183,17 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) { TRACE("(%u, %p)\n", wDevID, dwParam1); - *dwParam1 = MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].ossdev.interface_name, -1, + *dwParam1 = MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].ossdev.interface_name, -1, NULL, 0 ) * sizeof(WCHAR); return MMSYSERR_NOERROR; } static DWORD wodDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2) { - if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].ossdev.interface_name, -1, + if (dwParam2 >= MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].ossdev.interface_name, -1, NULL, 0 ) * sizeof(WCHAR)) { - MultiByteToWideChar(CP_ACP, 0, WOutDev[wDevID].ossdev.interface_name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, WOutDev[wDevID].ossdev.interface_name, -1, dwParam1, dwParam2 / sizeof(WCHAR)); return MMSYSERR_NOERROR; } @@ -205,17 +205,17 @@ static DWORD widDevInterfaceSize(UINT wDevID, LPDWORD dwParam1) { TRACE("(%u, %p)\n", wDevID, dwParam1); - *dwParam1 = MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].ossdev.interface_name, -1, + *dwParam1 = MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].ossdev.interface_name, -1, NULL, 0 ) * sizeof(WCHAR); return MMSYSERR_NOERROR; } static DWORD widDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2) { - if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].ossdev.interface_name, -1, + if (dwParam2 >= MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].ossdev.interface_name, -1, NULL, 0 ) * sizeof(WCHAR)) { - MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].ossdev.interface_name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, WInDev[wDevID].ossdev.interface_name, -1, dwParam1, dwParam2 / sizeof(WCHAR)); return MMSYSERR_NOERROR; } @@ -720,7 +720,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev) if (ioctl(mixer, SNDCTL_MIXERINFO, &info) >= 0) { lstrcpynA(ossdev->ds_desc.szDesc, info.name, sizeof(info.name)); strcpy(ossdev->ds_desc.szDrvname, "wineoss.drv"); - MultiByteToWideChar(CP_ACP, 0, info.name, sizeof(info.name), + MultiByteToWideChar(CP_UNIXCP, 0, info.name, sizeof(info.name), ossdev->out_caps.szPname, sizeof(ossdev->out_caps.szPname) / sizeof(WCHAR)); TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc); @@ -741,7 +741,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev) if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) { lstrcpynA(ossdev->ds_desc.szDesc, info.name, sizeof(info.name)); strcpy(ossdev->ds_desc.szDrvname, "wineoss.drv"); - MultiByteToWideChar(CP_ACP, 0, info.name, sizeof(info.name), + MultiByteToWideChar(CP_UNIXCP, 0, info.name, sizeof(info.name), ossdev->out_caps.szPname, sizeof(ossdev->out_caps.szPname) / sizeof(WCHAR)); TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc); @@ -893,7 +893,7 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev) oss_mixerinfo info; info.dev = 0; if (ioctl(mixer, SNDCTL_MIXERINFO, &info) >= 0) { - MultiByteToWideChar(CP_ACP, 0, info.name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, info.name, -1, ossdev->in_caps.szPname, sizeof(ossdev->in_caps.szPname) / sizeof(WCHAR)); TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc); @@ -911,7 +911,7 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* ossdev) if ((mixer = open(ossdev->mixer_name, O_RDONLY|O_NDELAY)) >= 0) { mixer_info info; if (ioctl(mixer, SOUND_MIXER_INFO, &info) >= 0) { - MultiByteToWideChar(CP_ACP, 0, info.name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, info.name, -1, ossdev->in_caps.szPname, sizeof(ossdev->in_caps.szPname) / sizeof(WCHAR)); TRACE("%s: %s\n", ossdev->mixer_name, ossdev->ds_desc.szDesc); diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c index bd6e74bb2d4..99a9ce08f63 100644 --- a/dlls/wineoss.drv/midi.c +++ b/dlls/wineoss.drv/midi.c @@ -239,7 +239,7 @@ LRESULT OSS_MidiInit(void) MidiOutDev[i].caps.wNotes = 16; MidiOutDev[i].bEnabled = FALSE; } else { - MultiByteToWideChar( CP_ACP, 0, sinfo.name, -1, + MultiByteToWideChar( CP_UNIXCP, 0, sinfo.name, -1, MidiOutDev[i].caps.szPname, sizeof(MidiOutDev[i].caps.szPname)/sizeof(WCHAR) ); @@ -313,7 +313,7 @@ LRESULT OSS_MidiInit(void) wsprintfW(MidiOutDev[numsynthdevs + i].caps.szPname, fmt, numsynthdevs + i); MidiOutDev[numsynthdevs + i].bEnabled = FALSE; } else { - MultiByteToWideChar(CP_ACP, 0, minfo.name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, minfo.name, -1, MidiOutDev[numsynthdevs + i].caps.szPname, sizeof(MidiOutDev[numsynthdevs + i].caps.szPname) / sizeof(WCHAR)); MidiOutDev[numsynthdevs + i].bEnabled = TRUE; @@ -344,7 +344,7 @@ LRESULT OSS_MidiInit(void) wsprintfW(MidiInDev[i].caps.szPname, fmt, numsynthdevs + i); MidiInDev[i].state = -1; } else { - MultiByteToWideChar(CP_ACP, 0, minfo.name, -1, + MultiByteToWideChar(CP_UNIXCP, 0, minfo.name, -1, MidiInDev[i].caps.szPname, sizeof(MidiInDev[i].caps.szPname) / sizeof(WCHAR)); MidiInDev[i].state = 0; diff --git a/dlls/wineoss.drv/mixer.c b/dlls/wineoss.drv/mixer.c index ac06f1ad943..0ed9ab0befb 100644 --- a/dlls/wineoss.drv/mixer.c +++ b/dlls/wineoss.drv/mixer.c @@ -625,7 +625,7 @@ static DWORD MIX_GetDevCaps(WORD wDevID, LPMIXERCAPSW lpCaps, DWORD dwSize) capsW.wPid = WINE_MIXER_PRODUCT_ID; capsW.vDriverVersion = WINE_MIXER_VERSION; if (!(name = mix->name)) name = WINE_MIXER_NAME; - MultiByteToWideChar(CP_ACP, 0, name, -1, capsW.szPname, sizeof(capsW.szPname) / sizeof(WCHAR)); + MultiByteToWideChar(CP_UNIXCP, 0, name, -1, capsW.szPname, sizeof(capsW.szPname) / sizeof(WCHAR)); capsW.cDestinations = 2; /* speakers & record */ capsW.fdwSupport = 0; /* No bits defined yet */ @@ -665,8 +665,8 @@ static DWORD MIX_GetLineInfoDst(struct mixer* mix, LPMIXERLINEW lpMl, return MMSYSERR_ERROR; } lpMl->dwSource = 0xFFFFFFFF; - MultiByteToWideChar(CP_ACP, 0, MIX_Labels[j], -1, lpMl->szShortName, sizeof(lpMl->szShortName) / sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, MIX_Names[j], -1, lpMl->szName, sizeof(lpMl->szName) / sizeof(WCHAR)); + MultiByteToWideChar(CP_UNIXCP, 0, MIX_Labels[j], -1, lpMl->szShortName, sizeof(lpMl->szShortName) / sizeof(WCHAR)); + MultiByteToWideChar(CP_UNIXCP, 0, MIX_Names[j], -1, lpMl->szName, sizeof(lpMl->szName) / sizeof(WCHAR)); /* we have all connections found in the MIX_DevMask */ lpMl->cConnections = 0; @@ -696,8 +696,8 @@ static DWORD MIX_GetLineInfoSrc(struct mixer* mix, LPMIXERLINEW lpMl, TRACE("(%p, %p, %d, %08x)\n", mix, lpMl, idx, dst); - MultiByteToWideChar(CP_ACP, 0, MIX_Labels[idx], -1, lpMl->szShortName, sizeof(lpMl->szShortName) / sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, MIX_Names[idx], -1, lpMl->szName, sizeof(lpMl->szName) / sizeof(WCHAR)); + MultiByteToWideChar(CP_UNIXCP, 0, MIX_Labels[idx], -1, lpMl->szShortName, sizeof(lpMl->szShortName) / sizeof(WCHAR)); + MultiByteToWideChar(CP_UNIXCP, 0, MIX_Names[idx], -1, lpMl->szName, sizeof(lpMl->szName) / sizeof(WCHAR)); lpMl->dwLineID = MAKELONG(dst, idx); lpMl->dwDestination = dst; lpMl->cConnections = 1; @@ -929,7 +929,7 @@ static DWORD MIX_GetLineInfo(WORD wDevID, LPMIXERLINEW lpMl, DWORD fdwInfo) lpMl->Target.wPid = WINE_MIXER_PRODUCT_ID; lpMl->Target.vDriverVersion = WINE_MIXER_VERSION; if (!(name = mix->name)) name = WINE_MIXER_NAME; - MultiByteToWideChar(CP_ACP, 0, name, -1, lpMl->Target.szPname, sizeof(lpMl->Target.szPname) / sizeof(WCHAR)); + MultiByteToWideChar(CP_UNIXCP, 0, name, -1, lpMl->Target.szPname, sizeof(lpMl->Target.szPname) / sizeof(WCHAR)); } return ret; @@ -1236,7 +1236,7 @@ static DWORD MIX_GetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd, { mcdlt[i].dwParam1 = MAKELONG(LINEID_RECORD, j); mcdlt[i].dwParam2 = 0; - MultiByteToWideChar(CP_ACP, 0, MIX_Names[j], -1, + MultiByteToWideChar(CP_UNIXCP, 0, MIX_Names[j], -1, mcdlt[i].szName, sizeof(mcdlt[i]) / sizeof(WCHAR)); i++; }