2020-06-02 23:24:40 +02:00
|
|
|
#include "switchcontroller.hpp"
|
|
|
|
|
2020-07-11 13:43:21 +02:00
|
|
|
namespace ams::controller {
|
2020-06-02 23:24:40 +02:00
|
|
|
|
2020-07-11 20:26:55 +02:00
|
|
|
SwitchController::SwitchController(ControllerType type, const bluetooth::Address *address)
|
|
|
|
: m_type(type),
|
|
|
|
m_address(*address),
|
|
|
|
m_battery(8) {
|
|
|
|
m_switchController = (type == ControllerType_Joycon) || (type == ControllerType_SwitchPro);
|
|
|
|
}
|
2020-06-02 23:24:40 +02:00
|
|
|
|
2020-07-11 20:26:55 +02: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 23:24:40 +02:00
|
|
|
|
|
|
|
}
|