Michael Stefaniuc : mciwave: Use wide-char string literals.
Alexandre Julliard
julliard at winehq.org
Mon Oct 5 15:54:57 CDT 2020
Module: wine
Branch: master
Commit: 796cd56faf3384dab41be23967766d01e45dd7f4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=796cd56faf3384dab41be23967766d01e45dd7f4
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Sat Oct 3 20:28:17 2020 +0200
mciwave: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mciwave/mciwave.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/mciwave/mciwave.c b/dlls/mciwave/mciwave.c
index 78f26c2672..13dd927cd4 100644
--- a/dlls/mciwave/mciwave.c
+++ b/dlls/mciwave/mciwave.c
@@ -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))
More information about the wine-cvs
mailing list