mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 09:14:04 +02:00
Fix a type mismatch error.
Public issue https://github.com/mackron/miniaudio/issues/385
This commit is contained in:
+2
-2
@@ -23419,10 +23419,10 @@ static ma_result ma_context_get_device_info_from_WAVECAPS(ma_context* pContext,
|
|||||||
if (((MA_PFN_RegOpenKeyExA)pContext->win32.RegOpenKeyExA)(HKEY_LOCAL_MACHINE, keyStr, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
|
if (((MA_PFN_RegOpenKeyExA)pContext->win32.RegOpenKeyExA)(HKEY_LOCAL_MACHINE, keyStr, 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
|
||||||
BYTE nameFromReg[512];
|
BYTE nameFromReg[512];
|
||||||
DWORD nameFromRegSize = sizeof(nameFromReg);
|
DWORD nameFromRegSize = sizeof(nameFromReg);
|
||||||
result = ((MA_PFN_RegQueryValueExA)pContext->win32.RegQueryValueExA)(hKey, "Name", 0, NULL, (LPBYTE)nameFromReg, (LPDWORD)&nameFromRegSize);
|
LONG resultWin32 = ((MA_PFN_RegQueryValueExA)pContext->win32.RegQueryValueExA)(hKey, "Name", 0, NULL, (LPBYTE)nameFromReg, (LPDWORD)&nameFromRegSize);
|
||||||
((MA_PFN_RegCloseKey)pContext->win32.RegCloseKey)(hKey);
|
((MA_PFN_RegCloseKey)pContext->win32.RegCloseKey)(hKey);
|
||||||
|
|
||||||
if (result == ERROR_SUCCESS) {
|
if (resultWin32 == ERROR_SUCCESS) {
|
||||||
/* We have the value from the registry, so now we need to construct the name string. */
|
/* We have the value from the registry, so now we need to construct the name string. */
|
||||||
char name[1024];
|
char name[1024];
|
||||||
if (ma_strcpy_s(name, sizeof(name), pDeviceInfo->name) == 0) {
|
if (ma_strcpy_s(name, sizeof(name), pDeviceInfo->name) == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user