htc: free ourselves from the tyranny of numerical enums

This commit is contained in:
Michael Scire
2021-02-08 06:48:30 -08:00
committed by SciresM
parent 2341f18edd
commit e40eece74e
6 changed files with 131 additions and 87 deletions

View File

@@ -21,9 +21,21 @@ namespace ams::htclow::ctrl {
class HtcctrlStateMachine {
private:
enum ServiceChannelSupport {
ServiceChannelSupport_Unknown = 0,
ServiceChannelSupport_Suppported = 1,
ServiceChannelSupport_Unsupported = 2,
};
enum ServiceChannelConnect {
ServiceChannelConnect_NotConnecting = 0,
ServiceChannelConnect_Connecting = 1,
ServiceChannelConnect_ConnectingChecked = 2,
};
struct ServiceChannelState {
u32 _00;
u32 _04;
ServiceChannelSupport support;
ServiceChannelConnect connect;
};
static constexpr int MaxChannelCount = 10;