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.
This commit is contained in:
NeoBrainX 2013-04-29 21:30:14 +02:00
parent 8dbe236606
commit 76a316ffab
1 changed files with 8 additions and 8 deletions

View File

@ -87,8 +87,8 @@ inline void init_lib()
hid_lib = LoadLibrary(_T("hid.dll")); hid_lib = LoadLibrary(_T("hid.dll"));
if (!hid_lib) if (!hid_lib)
{ {
PanicAlertT("Failed to load hid.dll"); PanicAlertT("Failed to load hid.dll! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
exit(EXIT_FAILURE); return;
} }
HidD_GetHidGuid = (PHidD_GetHidGuid)GetProcAddress(hid_lib, "HidD_GetHidGuid"); HidD_GetHidGuid = (PHidD_GetHidGuid)GetProcAddress(hid_lib, "HidD_GetHidGuid");
@ -98,15 +98,15 @@ inline void init_lib()
if (!HidD_GetHidGuid || !HidD_GetAttributes || if (!HidD_GetHidGuid || !HidD_GetAttributes ||
!HidD_SetOutputReport || !HidD_GetProductString) !HidD_SetOutputReport || !HidD_GetProductString)
{ {
PanicAlertT("Failed to load hid.dll"); PanicAlertT("Failed to load hid.dll! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
exit(EXIT_FAILURE); return;
} }
bthprops_lib = LoadLibrary(_T("bthprops.cpl")); bthprops_lib = LoadLibrary(_T("bthprops.cpl"));
if (!bthprops_lib) if (!bthprops_lib)
{ {
PanicAlertT("Failed to load bthprops.cpl"); PanicAlertT("Failed to load bthprops.cpl! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
exit(EXIT_FAILURE); return;
} }
Bth_BluetoothFindDeviceClose = (PBth_BluetoothFindDeviceClose)GetProcAddress(bthprops_lib, "BluetoothFindDeviceClose"); Bth_BluetoothFindDeviceClose = (PBth_BluetoothFindDeviceClose)GetProcAddress(bthprops_lib, "BluetoothFindDeviceClose");
@ -128,8 +128,8 @@ inline void init_lib()
!Bth_BluetoothSetServiceState || !Bth_BluetoothAuthenticateDevice || !Bth_BluetoothSetServiceState || !Bth_BluetoothAuthenticateDevice ||
!Bth_BluetoothEnumerateInstalledServices) !Bth_BluetoothEnumerateInstalledServices)
{ {
PanicAlertT("Failed to load bthprops.cpl"); PanicAlertT("Failed to load bthprops.cpl! Connecting real Wiimotes won't work and Dolphin might crash unexpectedly!");
exit(EXIT_FAILURE); return;
} }
initialized = true; initialized = true;