From 3caadcf616074c6bedcd45e8af2854379f08e275 Mon Sep 17 00:00:00 2001 From: "Deal(一线灵)" Date: Wed, 31 May 2023 15:24:11 +0800 Subject: Improve wasapi backend UWP support (#853) * Improve wasapi, support uwp build * Fix compile errors * [UWP] Support ReadALConfig from app roaming * [UWP] Post disconnect event when default device changed * [UWP] Fix appveyor ci * [WIN32] Default device change notification support * Fix warnings * Add event to notify the app when the default device changes - Event type: AL_EVENT_TYPE_DEFAULT_DEVICE_CHANGED_SOFT=0x19A7 - Event callback parameters: void _onALSoftEvent(ALenum eventType, ALuint object, // dataFlow: 0(render), 1(capture) ALuint param, // 0 ALsizei length, // 0 const ALchar* message, // Default device changed: void* userParam); * Fix warnings * Fire default device changed event in mixerProc thread * Fix compile warning * [UWP] Improve cmake * Revert changes * Notify default device change by system event callback * Revert insignificant change * Remove duplicate call --- router/router.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'router') diff --git a/router/router.cpp b/router/router.cpp index 3c891053..18ecf9b4 100644 --- a/router/router.cpp +++ b/router/router.cpp @@ -334,7 +334,7 @@ void LoadDriverList(void) TRACE("Got DLL path %ls\n", dll_path); GetCurrentDirectoryW(MAX_PATH, cwd_path); - len = lstrlenW(cwd_path); + len = wcslen(cwd_path); if(len > 0 && (cwd_path[len-1] == '\\' || cwd_path[len-1] == '/')) cwd_path[len-1] = '\0'; TRACE("Got current working directory %ls\n", cwd_path); @@ -343,7 +343,7 @@ void LoadDriverList(void) TRACE("Got proc path %ls\n", proc_path); GetSystemDirectoryW(sys_path, MAX_PATH); - len = lstrlenW(sys_path); + len = wcslen(sys_path); if(len > 0 && (sys_path[len-1] == '\\' || sys_path[len-1] == '/')) sys_path[len-1] = '\0'; TRACE("Got system path %ls\n", sys_path); -- cgit v1.2.3