mciwave: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
521f954d3c
commit
796cd56faf
|
@ -1683,15 +1683,11 @@ static DWORD WAVE_mciInfo(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW l
|
|||
if (wmw == NULL) {
|
||||
ret = MCIERR_INVALID_DEVICE_ID;
|
||||
} else {
|
||||
static const WCHAR wszAudio [] = {'W','i','n','e','\'','s',' ','a','u','d','i','o',' ','p','l','a','y','e','r',0};
|
||||
static const WCHAR wszWaveIn [] = {'W','i','n','e',' ','W','a','v','e',' ','I','n',0};
|
||||
static const WCHAR wszWaveOut[] = {'W','i','n','e',' ','W','a','v','e',' ','O','u','t',0};
|
||||
|
||||
switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) {
|
||||
case MCI_INFO_PRODUCT: str = wszAudio; break;
|
||||
case MCI_INFO_PRODUCT: str = L"Wine's audio player"; break;
|
||||
case MCI_INFO_FILE: str = wmw->lpFileName; break;
|
||||
case MCI_WAVE_INPUT: str = wszWaveIn; break;
|
||||
case MCI_WAVE_OUTPUT: str = wszWaveOut; break;
|
||||
case MCI_WAVE_INPUT: str = L"Wine Wave In"; break;
|
||||
case MCI_WAVE_OUTPUT: str = L"Wine Wave Out"; break;
|
||||
default:
|
||||
WARN("Don't know this info command (%u)\n", dwFlags);
|
||||
ret = MCIERR_UNRECOGNIZED_KEYWORD;
|
||||
|
@ -1699,10 +1695,9 @@ static DWORD WAVE_mciInfo(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW l
|
|||
}
|
||||
if (!ret) {
|
||||
if (lpParms->dwRetSize) {
|
||||
WCHAR zero = 0;
|
||||
/* FIXME? Since NT, mciwave, mciseq and mcicda set dwRetSize
|
||||
* to the number of characters written, excluding \0. */
|
||||
lstrcpynW(lpParms->lpstrReturn, str ? str : &zero, lpParms->dwRetSize);
|
||||
lstrcpynW(lpParms->lpstrReturn, str ? str : L"", lpParms->dwRetSize);
|
||||
} else ret = MCIERR_PARAM_OVERFLOW;
|
||||
}
|
||||
if (MMSYSERR_NOERROR==ret && (dwFlags & MCI_NOTIFY))
|
||||
|
|
Loading…
Reference in New Issue