Fix all mingw errors & warnings (#411)

* Use COMPAT_MODE macro to fix errors with mingw gcc 12.2

* MxOmni::m_timerRunning is a MxBool

* MxDirect3D::m_unk0x88c is a MxBool

* MxBackgroundAudioManager::m_unk0x13c is a MxS32

* Fix warning: deleting 'void*' is undefined [-Wdelete-incomplete]

* Fix inline function 'void TglImpl::RendererImpl::Destroy()' used but never defined

* Fix warning: inline function 'MxStreamerSubClass1::MxStreamerSubClass1(undefined4)' used but never defined

* Use `FALSE` for m_timerRunning

* Format

* Format

* Remove comment

* Limit scope for variables in compat mode

* clang-format

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Anonymous Maarten
2024-01-07 18:30:45 +01:00
committed by GitHub
parent bb7e4df11b
commit fbe7f8bbb0
16 changed files with 144 additions and 40 deletions

View File

@@ -23,8 +23,16 @@ MxDiskStreamController::~MxDiskStreamController()
m_unk0xc4 = FALSE;
m_unk0x70 = FALSE;
if (m_provider)
if (m_provider) {
#ifdef COMPAT_MODE
{
MxDSAction action;
m_provider->VTable0x20(&action);
}
#else
m_provider->VTable0x20(&MxDSAction());
#endif
}
MxDSAction* action;
while (m_unk0x3c.PopFront(action))
@@ -299,9 +307,16 @@ MxResult MxDiskStreamController::VTable0x24(MxDSAction* p_action)
MxAutoLocker lock(&this->m_criticalSection);
if (m_unk0x54.Find(p_action, FALSE) == NULL) {
if (VTable0x30(p_action) == SUCCESS) {
#ifdef COMPAT_MODE
{
MxEndActionNotificationParam param(c_notificationEndAction, NULL, p_action, TRUE);
MxOmni::GetInstance()->NotifyCurrentEntity(&param);
}
#else
MxOmni::GetInstance()->NotifyCurrentEntity(
&MxEndActionNotificationParam(c_notificationEndAction, NULL, p_action, TRUE)
);
#endif
}
}