From e1fcf4ef1926fd166aeb848d14daccca2c3f3cb3 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 17 Apr 2023 13:36:52 -0400 Subject: [PATCH] haze: misc --- troposphere/haze/include/haze/ptp.hpp | 18 +++++++++--------- .../haze/include/haze/ptp_object_database.hpp | 4 ++-- troposphere/haze/source/event_reactor.cpp | 1 + 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/troposphere/haze/include/haze/ptp.hpp b/troposphere/haze/include/haze/ptp.hpp index 2a9f18fc7..055d3a82e 100644 --- a/troposphere/haze/include/haze/ptp.hpp +++ b/troposphere/haze/include/haze/ptp.hpp @@ -25,11 +25,11 @@ namespace haze { constexpr inline u32 PtpStringMaxLength = 255; enum PtpUsbBulkContainerType : u16 { - PtpUsbBulkContainerType_Undefined = 0, - PtpUsbBulkContainerType_Command = 1, - PtpUsbBulkContainerType_Data = 2, - PtpUsbBulkContainerType_Response = 3, - PtpUsbBulkContainerType_Event = 4, + PtpUsbBulkContainerType_Undefined = 0x0000, + PtpUsbBulkContainerType_Command = 0x0001, + PtpUsbBulkContainerType_Data = 0x0002, + PtpUsbBulkContainerType_Response = 0x0003, + PtpUsbBulkContainerType_Event = 0x0004, }; enum PtpOperationCode : u16 { @@ -427,13 +427,13 @@ namespace haze { }; enum PtpAssociationType : u16 { - PtpAssociationType_Undefined = 0x0, - PtpAssociationType_GenericFolder = 0x1, + PtpAssociationType_Undefined = 0x0000, + PtpAssociationType_GenericFolder = 0x0001, }; enum PtpGetObjectHandles : u32 { - PtpGetObjectHandles_AllFormats = 0x0, - PtpGetObjectHandles_AllAssocs = 0x0, + PtpGetObjectHandles_AllFormats = 0x00000000, + PtpGetObjectHandles_AllAssocs = 0x00000000, PtpGetObjectHandles_AllStorage = 0xffffffff, PtpGetObjectHandles_RootParent = 0xffffffff, }; diff --git a/troposphere/haze/include/haze/ptp_object_database.hpp b/troposphere/haze/include/haze/ptp_object_database.hpp index 24001a8c3..7443bab40 100644 --- a/troposphere/haze/include/haze/ptp_object_database.hpp +++ b/troposphere/haze/include/haze/ptp_object_database.hpp @@ -56,7 +56,7 @@ namespace haze { } }; - struct IdComparator { + struct ObjectIdComparator { struct RedBlackKeyType { u32 m_object_id; @@ -80,7 +80,7 @@ namespace haze { using ObjectNameTree = ObjectNameTreeTraits::TreeType; using ObjectIdTreeTraits = util::IntrusiveRedBlackTreeMemberTraitsDeferredAssert<&PtpObject::m_object_id_node>; - using ObjectIdTree = ObjectIdTreeTraits::TreeType; + using ObjectIdTree = ObjectIdTreeTraits::TreeType; PtpObjectHeap *m_object_heap; ObjectNameTree m_name_tree; diff --git a/troposphere/haze/source/event_reactor.cpp b/troposphere/haze/source/event_reactor.cpp index 0b58eeae0..f43d7735d 100644 --- a/troposphere/haze/source/event_reactor.cpp +++ b/troposphere/haze/source/event_reactor.cpp @@ -53,6 +53,7 @@ namespace haze { HAZE_ASSERT(m_num_wait_objects + num_arg_waiters <= svc::ArgumentHandleCountMax); while (true) { + /* Check if we should wait for an event. */ R_TRY(m_result); /* Insert waiters from argument list. */