Config: Port BluetoothPassthrough settings to new config system.

This commit is contained in:
Admiral H. Curtiss 2021-12-29 17:20:32 +01:00
commit 526887899e
No known key found for this signature in database
GPG key ID: F051B4C4044F33FB
13 changed files with 39 additions and 50 deletions

View file

@ -29,7 +29,7 @@
#include "Common/StringUtil.h"
#include "Common/Swap.h"
#include "Core/CommonTitles.h"
#include "Core/ConfigManager.h"
#include "Core/Config/MainSettings.h"
#include "Core/IOS/Device.h"
#include "Core/IOS/ES/ES.h"
#include "Core/IOS/ES/Formats.h"
@ -967,14 +967,14 @@ static std::shared_ptr<IOS::HLE::Device> GetBluetoothDevice()
std::shared_ptr<IOS::HLE::BluetoothEmuDevice> GetBluetoothEmuDevice()
{
if (SConfig::GetInstance().m_bt_passthrough_enabled)
if (Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
return nullptr;
return std::static_pointer_cast<IOS::HLE::BluetoothEmuDevice>(GetBluetoothDevice());
}
std::shared_ptr<IOS::HLE::BluetoothRealDevice> GetBluetoothRealDevice()
{
if (!SConfig::GetInstance().m_bt_passthrough_enabled)
if (!Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
return nullptr;
return std::static_pointer_cast<IOS::HLE::BluetoothRealDevice>(GetBluetoothDevice());
}