From 8cd7fac16a7f0a7f793358fac1245acd26b30713 Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Sat, 27 Jan 2024 17:03:58 -0500 Subject: [PATCH] push changes --- .../lego/legoomni/include/legoinputmanager.h | 30 +++++++++++++++++++ .../legoomni/src/input/legoinputmanager.cpp | 20 +++++++++---- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/LEGO1/lego/legoomni/include/legoinputmanager.h b/LEGO1/lego/legoomni/include/legoinputmanager.h index 4d3d0f76..9ae001ea 100644 --- a/LEGO1/lego/legoomni/include/legoinputmanager.h +++ b/LEGO1/lego/legoomni/include/legoinputmanager.h @@ -48,6 +48,27 @@ class LegoNotifyList : public MxPtrList { LegoNotifyList(MxBool p_ownership = FALSE) : MxPtrList(p_ownership) {} }; +// VTABLE: LEGO1 0x100d6ac0 +// class MxListCursor + +// VTABLE: LEGO1 0x100d6ad8 +// class MxPtrListCursor + +// VTABLE: LEGO1 0x100d6aa8 +class LegoNotifyListCursor : public MxPtrListCursor { +public: + LegoNotifyListCursor(LegoNotifyList* p_list) : MxPtrListCursor(p_list) {} +}; + +// SYNTHETIC: LEGO1 0x10028fd0 +// LegoNotifyListCursor::`scalar deleting destructor' + +// SYNTHETIC: LEGO1 0x10029090 +// MxListCursor::`scalar deleting destructor' + +// SYNTHETIC: LEGO1 0x10029100 +// MxPtrListCursor::`scalar deleting destructor' + // VTABLE: LEGO1 0x100d8760 // SIZE 0x338 class LegoInputManager : public MxPresenter { @@ -187,4 +208,13 @@ class LegoInputManager : public MxPresenter { // TEMPLATE: LEGO1 0x1005d010 // MxListEntry::GetValue +// TEMPLATE: LEGO1 0x10029170 +// MxListCursor::~MxListCursor + +// TEMPLATE: LEGO1 0x10029040 +// MxPtrListCursor::~MxPtrListCursor + +// TEMPLATE: LEGO1 0x100291c0 +// LegoNotifyListCursor::~LegoNotifyListCursor + #endif // LEGOINPUTMANAGER_H diff --git a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp index ec871b47..c0f34557 100644 --- a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp +++ b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp @@ -211,16 +211,24 @@ MxResult LegoInputManager::GetJoystickState( return FAILURE; } -// STUB: LEGO1 0x1005c470 -void LegoInputManager::Register(MxCore*) +// FUNCTION: LEGO1 0x1005c470 +void LegoInputManager::Register(MxCore* p_notify) { - // TODO + MxAutoLocker lock(&m_criticalSection); + + LegoNotifyListCursor cursor(m_keyboardNotifyList); + if (!cursor.Find(p_notify)) + m_keyboardNotifyList->Append(p_notify); } -// STUB: LEGO1 0x1005c5c0 -void LegoInputManager::UnRegister(MxCore*) +// FUNCTION: LEGO1 0x1005c5c0 +void LegoInputManager::UnRegister(MxCore* p_notify) { - // TODO + MxAutoLocker lock(&m_criticalSection); + + LegoNotifyListCursor cursor(m_keyboardNotifyList); + if (cursor.Find(p_notify)) + cursor.Detach(); } // FUNCTION: LEGO1 0x1005c700