mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 18:28:01 +00:00
ao_wasapi: do not use deprecated wchar functions
These break on UWP. Based on a patch by Pedro Pombeiro.
This commit is contained in:
parent
cd25d98bfa
commit
f22d12ac51
@ -422,7 +422,7 @@ static int thread_control(struct ao *ao, enum aocontrol cmd, void *arg)
|
||||
|
||||
SAFE_DESTROY(tmp, CoTaskMemFree(tmp));
|
||||
IAudioSessionControl_GetDisplayName(state->pSessionControl, &tmp);
|
||||
} while (lstrcmpW(title, tmp));
|
||||
} while (wcscmp(title, tmp));
|
||||
SAFE_DESTROY(tmp, CoTaskMemFree(tmp));
|
||||
talloc_free(title);
|
||||
return CONTROL_OK;
|
||||
|
@ -541,7 +541,7 @@ static void init_session_display(struct wasapi_state *state) {
|
||||
|
||||
wchar_t path[MAX_PATH+12] = {0};
|
||||
GetModuleFileNameW(NULL, path, MAX_PATH);
|
||||
lstrcatW(path, L",-IDI_ICON1");
|
||||
wcscat(path, L",-IDI_ICON1");
|
||||
hr = IAudioSessionControl_SetIconPath(state->pSessionControl, path, NULL);
|
||||
if (FAILED(hr)) {
|
||||
// don't goto exit_label here since SetDisplayName might still work
|
||||
|
Loading…
Reference in New Issue
Block a user