Commit 4c9e8c67 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

midimap: Use wide-char string literals.

parent 796cd56f
...@@ -220,9 +220,8 @@ static BOOL MIDIMAP_LoadSettings(MIDIMAPDATA* mom) ...@@ -220,9 +220,8 @@ static BOOL MIDIMAP_LoadSettings(MIDIMAPDATA* mom)
size = sizeof(out); size = sizeof(out);
if (!RegQueryValueExA(hKey, "UseScheme", 0, &type, (void*)&out, &size) && out) if (!RegQueryValueExA(hKey, "UseScheme", 0, &type, (void*)&out, &size) && out)
{ {
static const WCHAR cs[] = {'C','u','r','r','e','n','t','S','c','h','e','m','e',0};
size = sizeof(buffer); size = sizeof(buffer);
if (!RegQueryValueExW(hKey, cs, 0, &type, (void*)buffer, &size)) if (!RegQueryValueExW(hKey, L"CurrentScheme", 0, &type, (void*)buffer, &size))
{ {
if (!(ret = MIDIMAP_LoadSettingsScheme(mom, buffer))) if (!(ret = MIDIMAP_LoadSettingsScheme(mom, buffer)))
ret = MIDIMAP_LoadSettingsDefault(mom, NULL); ret = MIDIMAP_LoadSettingsDefault(mom, NULL);
...@@ -234,9 +233,8 @@ static BOOL MIDIMAP_LoadSettings(MIDIMAPDATA* mom) ...@@ -234,9 +233,8 @@ static BOOL MIDIMAP_LoadSettings(MIDIMAPDATA* mom)
} }
if (ret == 2) if (ret == 2)
{ {
static const WCHAR ci[] = {'C','u','r','r','e','n','t','I','n','s','t','r','u','m','e','n','t',0};
size = sizeof(buffer); size = sizeof(buffer);
if (!RegQueryValueExW(hKey, ci, 0, &type, (void*)buffer, &size) && *buffer) if (!RegQueryValueExW(hKey, L"CurrentInstrument", 0, &type, (void*)buffer, &size) && *buffer)
{ {
ret = MIDIMAP_LoadSettingsDefault(mom, buffer); ret = MIDIMAP_LoadSettingsDefault(mom, buffer);
} }
...@@ -470,8 +468,7 @@ static DWORD modGetDevCaps(UINT wDevID, MIDIMAPDATA* mom, LPMIDIOUTCAPSW lpMidiC ...@@ -470,8 +468,7 @@ static DWORD modGetDevCaps(UINT wDevID, MIDIMAPDATA* mom, LPMIDIOUTCAPSW lpMidiC
{ {
static const MIDIOUTCAPSW mappercaps = { static const MIDIOUTCAPSW mappercaps = {
0x00FF, 0x0001, 0x0100, /* Manufacturer and Product ID */ 0x00FF, 0x0001, 0x0100, /* Manufacturer and Product ID */
{'W','i','n','e',' ','m','i','d','i',' ','m','a','p','p','e','r',0}, L"Wine midi mapper", MOD_MAPPER, 0, 0, 0xFFFF,
MOD_MAPPER, 0, 0, 0xFFFF,
/* Native returns volume caps of underlying device + MIDICAPS_STREAM */ /* Native returns volume caps of underlying device + MIDICAPS_STREAM */
MIDICAPS_VOLUME|MIDICAPS_LRVOLUME MIDICAPS_VOLUME|MIDICAPS_LRVOLUME
}; };
...@@ -552,7 +549,6 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, ...@@ -552,7 +549,6 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
*/ */
static LRESULT MIDIMAP_drvOpen(void) static LRESULT MIDIMAP_drvOpen(void)
{ {
static const WCHAR throughportW[] = {'M','i','d','i',' ','T','h','r','o','u','g','h',0};
MIDIOUTCAPSW moc; MIDIOUTCAPSW moc;
unsigned dev, i; unsigned dev, i;
BOOL found_valid_port = FALSE; BOOL found_valid_port = FALSE;
...@@ -574,7 +570,7 @@ static LRESULT MIDIMAP_drvOpen(void) ...@@ -574,7 +570,7 @@ static LRESULT MIDIMAP_drvOpen(void)
midiOutPorts[dev].lpbPatch = NULL; midiOutPorts[dev].lpbPatch = NULL;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
midiOutPorts[dev].aChn[i] = i; midiOutPorts[dev].aChn[i] = i;
if (wcsncmp(midiOutPorts[dev].name, throughportW, lstrlenW(throughportW)) != 0) if (wcsncmp(midiOutPorts[dev].name, L"Midi Through", lstrlenW(L"Midi Through")) != 0)
found_valid_port = TRUE; found_valid_port = TRUE;
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment