htc: ObserverThread (mostly), system now boots + works with htc in bg

This commit is contained in:
Michael Scire 2021-02-10 04:22:19 -08:00 committed by SciresM
parent 79a3f442d6
commit 4d86863f2c
6 changed files with 83 additions and 7 deletions

View file

@ -33,11 +33,11 @@ namespace ams::htc::server {
os::ThreadType m_server_thread;
os::Event m_cancel_event;
bool m_cancelled;
os::Event m_connection_event;
mutable os::Event m_connection_event;
bool m_client_connected;
bool m_server_connected;
bool m_connected;
os::SdkMutex m_connection_mutex;
mutable os::SdkMutex m_connection_mutex;
private:
static void ClientThreadEntry(void *arg) { static_cast<HtcmiscImpl *>(arg)->ClientThread(); }
static void ServerThreadEntry(void *arg) { static_cast<HtcmiscImpl *>(arg)->ServerThread(); }
@ -47,6 +47,9 @@ namespace ams::htc::server {
public:
HtcmiscImpl(htclow::HtclowManager *htclow_manager);
~HtcmiscImpl();
os::EventType *GetConnectionEvent() const;
bool IsConnected() const;
private:
void SetClientConnectionEvent(bool en);
void SetServerConnectionEvent(bool en);