|
|
|
@ -1,5 +1,6 @@
|
|
|
|
#include "digital_controller.h"
|
|
|
|
#include "digital_controller.h"
|
|
|
|
#include "common/assert.h"
|
|
|
|
#include "common/assert.h"
|
|
|
|
|
|
|
|
#include "common/state_wrapper.h"
|
|
|
|
|
|
|
|
|
|
|
|
DigitalController::DigitalController() = default;
|
|
|
|
DigitalController::DigitalController() = default;
|
|
|
|
|
|
|
|
|
|
|
|
@ -20,6 +21,21 @@ std::optional<s32> DigitalController::GetButtonCodeByName(std::string_view butto
|
|
|
|
return StaticGetButtonCodeByName(button_name);
|
|
|
|
return StaticGetButtonCodeByName(button_name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DigitalController::Reset()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m_transfer_state = TransferState::Idle;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool DigitalController::DoState(StateWrapper& sw)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!Controller::DoState(sw))
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sw.Do(&m_button_state);
|
|
|
|
|
|
|
|
sw.Do(&m_transfer_state);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DigitalController::SetAxisState(s32 axis_code, float value) {}
|
|
|
|
void DigitalController::SetAxisState(s32 axis_code, float value) {}
|
|
|
|
|
|
|
|
|
|
|
|
void DigitalController::SetButtonState(Button button, bool pressed)
|
|
|
|
void DigitalController::SetButtonState(Button button, bool pressed)
|
|
|
|
|