diff options
author | wm4 <wm4@nowhere> | 2015-07-30 21:50:11 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-30 21:50:11 +0200 |
commit | fefac2c941149fb49bcb5126060be74494d0c287 (patch) | |
tree | 9835f45627a3c3bbb18f8e037ed0ff5ea24606a8 /audio/out/ao_wasapi_changenotify.c | |
parent | c8fab7cc7b98af8da0bf734dbdb1a3efc5db977e (diff) | |
download | mpv-fefac2c941149fb49bcb5126060be74494d0c287.tar.bz2 mpv-fefac2c941149fb49bcb5126060be74494d0c287.tar.xz |
win32: more wchar_t -> WCHAR replacements
This was essentially missing from commit 0b52ac8a.
Since L"..." string literals have the type wchar_t[], we can't use them
for UTF-16 strings. Use C11 u"..." string literals instead. These have
the type char16_t[], but we simply assume char16_t is the same
underlying type as WCHAR. In practice, they're both unsigned short.
For this reason use -std=c11 on Windows. Since Windows is a "special"
environment (we require either MinGW or Cygwin), we don't need to worry
too much about compiler compatibility.
Diffstat (limited to 'audio/out/ao_wasapi_changenotify.c')
-rwxr-xr-x | audio/out/ao_wasapi_changenotify.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/out/ao_wasapi_changenotify.c b/audio/out/ao_wasapi_changenotify.c index 1521578b19..41a93f6593 100755 --- a/audio/out/ao_wasapi_changenotify.c +++ b/audio/out/ao_wasapi_changenotify.c @@ -67,7 +67,7 @@ static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnDeviceStateChanged( if (change->is_hotplug) { MP_VERBOSE(ao, "OnDeviceStateChanged triggered: sending hotplug event\n"); ao_hotplug_event(ao); - } else if (pwstrDeviceId && !wcscmp(pwstrDeviceId, change->monitored)) { + } else if (pwstrDeviceId && !lstrcmpW(pwstrDeviceId, change->monitored)) { switch (dwNewState) { case DEVICE_STATE_DISABLED: case DEVICE_STATE_NOTPRESENT: @@ -110,7 +110,7 @@ static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnDeviceRemoved( if (change->is_hotplug) { MP_VERBOSE(ao, "OnDeviceRemoved triggered: sending hotplug event\n"); ao_hotplug_event(ao); - } else if (pwstrDeviceId && !wcscmp(pwstrDeviceId, change->monitored)) { + } else if (pwstrDeviceId && !lstrcmpW(pwstrDeviceId, change->monitored)) { MP_VERBOSE(ao, "OnDeviceRemoved triggered for device %S: " "requesting ao reload\n", pwstrDeviceId); ao_request_reload(ao); @@ -144,7 +144,7 @@ static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnDefaultDeviceChanged( } /* don't reload if already on the new default */ - if (pwstrDeviceId && !wcscmp(pwstrDeviceId, change->monitored)) { + if (pwstrDeviceId && !lstrcmpW(pwstrDeviceId, change->monitored)) { MP_VERBOSE(ao, "OnDefaultDeviceChanged triggered: " "already using default device, no reload required\n"); return S_OK; @@ -167,7 +167,7 @@ static HRESULT STDMETHODCALLTYPE sIMMNotificationClient_OnPropertyValueChanged( struct ao *ao = change->ao; if (!change->is_hotplug && pwstrDeviceId && - !wcscmp(pwstrDeviceId, change->monitored)) + !lstrcmpW(pwstrDeviceId, change->monitored)) { MP_VERBOSE(ao, "OnPropertyValueChanged triggered on device %S\n", pwstrDeviceId); |