Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 3, 2021. It is now read-only.

Commit 5b93f52

Browse files
authored
Merge pull request #634 from Yozer/master
Fixed ps move pairing on Windows 10 1903 and later. Oops I pressed the wrong button last time.
2 parents eaf82a8 + 90a9386 commit 5b93f52

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/psmoveservice/Platform/BluetoothRequestsWin32.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,18 +1544,11 @@ patch_registry(const BLUETOOTH_ADDRESS *move_addr, const BLUETOOTH_ADDRESS *radi
15441544
HKEY hKey;
15451545
if (success)
15461546
{
1547-
LONG result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sub_key, 0, KEY_READ | KEY_QUERY_VALUE | KEY_WOW64_64KEY | KEY_ALL_ACCESS, &hKey);
1547+
DWORD lpdwDisposition;
1548+
LONG result = RegCreateKeyEx(HKEY_LOCAL_MACHINE, sub_key, 0, nullptr, 0, KEY_READ | KEY_QUERY_VALUE | KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &hKey, &lpdwDisposition);
15481549
if (result != ERROR_SUCCESS)
15491550
{
1550-
if (result == ERROR_FILE_NOT_FOUND)
1551-
{
1552-
SERVER_MT_LOG_ERROR("AsyncBluetoothPairDeviceRequest") << "Failed to open registry key, it does not yet exist";
1553-
}
1554-
else
1555-
{
1556-
SERVER_MT_LOG_ERROR("AsyncBluetoothPairDeviceRequest") << "Failed to open registry key";
1557-
}
1558-
1551+
SERVER_MT_LOG_ERROR("AsyncBluetoothPairDeviceRequest") << "Failed to create registry key";
15591552
success= false;
15601553
}
15611554
}

0 commit comments

Comments
 (0)