htc: skeleton constructors for htcmisc

This commit is contained in:
Michael Scire
2021-02-09 20:43:40 -08:00
committed by SciresM
parent b925344c3b
commit 1f03b11dbc
12 changed files with 310 additions and 6 deletions

View File

@@ -64,6 +64,13 @@ namespace ams::htclow::ctrl {
return !ctrl::IsDisconnected(m_state) && m_state != HtcctrlState_DriverConnected;
}
bool HtcctrlStateMachine::IsDisconnectionNeeded() {
/* Lock ourselves. */
std::scoped_lock lk(m_mutex);
return !ctrl::IsDisconnected(m_state) && m_state != HtcctrlState_Sleep && m_state != HtcctrlState_DriverConnected;
}
bool HtcctrlStateMachine::IsConnected() {
/* Lock ourselves. */
std::scoped_lock lk(m_mutex);