2020-06-02 21:24:40 +00:00
|
|
|
#include "switchcontroller.hpp"
|
|
|
|
|
2020-07-11 11:43:21 +00:00
|
|
|
namespace ams::controller {
|
2020-06-02 21:24:40 +00:00
|
|
|
|
2020-07-11 18:26:55 +00:00
|
|
|
SwitchController::SwitchController(ControllerType type, const bluetooth::Address *address)
|
|
|
|
: m_type(type),
|
|
|
|
m_address(*address),
|
2020-07-11 21:19:56 +00:00
|
|
|
m_charging(false),
|
2020-07-21 10:15:52 +00:00
|
|
|
m_battery(BATTERY_MAX),
|
|
|
|
m_switchController((type == ControllerType_Joycon) || (type == ControllerType_SwitchPro)) {}
|
2020-06-02 21:24:40 +00:00
|
|
|
|
2020-07-11 18:26:55 +00:00
|
|
|
const bluetooth::Address& SwitchController::address(void) const {
|
|
|
|
return m_address;
|
|
|
|
}
|
|
|
|
|
|
|
|
ControllerType SwitchController::type(void) {
|
|
|
|
return m_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool SwitchController::isSwitchController(void) {
|
|
|
|
return m_switchController;
|
|
|
|
}
|
|
|
|
|
|
|
|
Result SwitchController::initialize(void) {
|
|
|
|
return 0;
|
|
|
|
}
|
2020-06-02 21:24:40 +00:00
|
|
|
|
|
|
|
}
|