Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't exit when bluetooth support is not available on Windows.
Fixes running Dolphin in Wine and on regular Windows setups where bthprops.cpl is not available.

Fixes issue 6283.
  • Loading branch information
neobrain committed Apr 29, 2013
1 parent 8dbe236 commit 76a316f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp
Expand Up @@ -87,8 +87,8 @@ inline void init_lib()
hid_lib = LoadLibrary(_T("hid.dll"));
if (!hid_lib)
{
PanicAlertT("Failed to load hid.dll");
exit(EXIT_FAILURE);
PanicAlertT("Failed to load hid.dll! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
return;
}

HidD_GetHidGuid = (PHidD_GetHidGuid)GetProcAddress(hid_lib, "HidD_GetHidGuid");
Expand All @@ -98,15 +98,15 @@ inline void init_lib()
if (!HidD_GetHidGuid || !HidD_GetAttributes ||
!HidD_SetOutputReport || !HidD_GetProductString)
{
PanicAlertT("Failed to load hid.dll");
exit(EXIT_FAILURE);
PanicAlertT("Failed to load hid.dll! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
return;
}

bthprops_lib = LoadLibrary(_T("bthprops.cpl"));
if (!bthprops_lib)
{
PanicAlertT("Failed to load bthprops.cpl");
exit(EXIT_FAILURE);
PanicAlertT("Failed to load bthprops.cpl! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
return;
}

Bth_BluetoothFindDeviceClose = (PBth_BluetoothFindDeviceClose)GetProcAddress(bthprops_lib, "BluetoothFindDeviceClose");
Expand All @@ -128,8 +128,8 @@ inline void init_lib()
!Bth_BluetoothSetServiceState || !Bth_BluetoothAuthenticateDevice ||
!Bth_BluetoothEnumerateInstalledServices)
{
PanicAlertT("Failed to load bthprops.cpl");
exit(EXIT_FAILURE);
PanicAlertT("Failed to load bthprops.cpl! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
return;
}

initialized = true;
Expand Down

0 comments on commit 76a316f

Please sign in to comment.