Use AUTOLOCK macro (#660)

* Use AUTOLOCK macro

* MxAutoLock

* Remove semicolon

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
This commit is contained in:
MS
2024-03-12 10:23:50 -04:00
committed by GitHub
parent b0483000d8
commit e3d7188ec9
28 changed files with 127 additions and 125 deletions

View File

@@ -1,6 +1,6 @@
#include "mxloopingsmkpresenter.h"
#include "mxautolocker.h"
#include "mxautolock.h"
#include "mxdsmediaaction.h"
DECOMP_SIZE_ASSERT(MxLoopingSmkPresenter, 0x724);
@@ -122,7 +122,7 @@ void MxLoopingSmkPresenter::RepeatingTickle()
// FUNCTION: LEGO1 0x100b4cd0
MxResult MxLoopingSmkPresenter::AddToManager()
{
MxAutoLocker lock(&m_criticalSection);
AUTOLOCK(m_criticalSection);
return MxSmkPresenter::AddToManager();
}

View File

@@ -1,6 +1,6 @@
#include "mxvideomanager.h"
#include "mxautolocker.h"
#include "mxautolock.h"
#include "mxmisc.h"
#include "mxomni.h"
#include "mxpresenter.h"
@@ -306,7 +306,7 @@ void MxVideoManager::InvalidateRect(MxRect32& p_rect)
// FUNCTION: LEGO1 0x100bea90
MxResult MxVideoManager::Tickle()
{
MxAutoLocker lock(&this->m_criticalSection);
AUTOLOCK(m_criticalSection);
SortPresenterList();

View File

@@ -1,6 +1,6 @@
#include "mxvideopresenter.h"
#include "mxautolocker.h"
#include "mxautolock.h"
#include "mxdsmediaaction.h"
#include "mxmisc.h"
#include "mxregioncursor.h"
@@ -544,7 +544,7 @@ void MxVideoPresenter::EndAction()
{
if (m_action) {
MxMediaPresenter::EndAction();
MxAutoLocker lock(&m_criticalSection);
AUTOLOCK(m_criticalSection);
if (m_bitmap) {
MxLong height = m_bitmap->GetBmiHeightAbs();
@@ -562,7 +562,7 @@ void MxVideoPresenter::EndAction()
// FUNCTION: LEGO1 0x100b3280
MxResult MxVideoPresenter::PutData()
{
MxAutoLocker lock(&m_criticalSection);
AUTOLOCK(m_criticalSection);
if (IsEnabled() && m_currentTickleState >= e_streaming && m_currentTickleState <= e_unk5) {
PutFrame();