From 396bf6b56277e2fb021d059b8ee6a0506c2cfde1 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 13 May 2025 18:42:12 -0700 Subject: [PATCH 1/2] Fix wrong deletes in MxBitmap (#1482) --- LEGO1/omni/src/video/mxbitmap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LEGO1/omni/src/video/mxbitmap.cpp b/LEGO1/omni/src/video/mxbitmap.cpp index 76c7bafe..d74008a0 100644 --- a/LEGO1/omni/src/video/mxbitmap.cpp +++ b/LEGO1/omni/src/video/mxbitmap.cpp @@ -80,7 +80,7 @@ MxResult MxBitmap::SetSize(MxS32 p_width, MxS32 p_height, MxPalette* p_palette, done: if (ret) { if (m_info) { - delete[] m_info; + delete[] ((MxU8*) m_info); m_info = NULL; } @@ -118,7 +118,7 @@ MxResult MxBitmap::ImportBitmapInfo(MxBITMAPINFO* p_info) done: if (result != SUCCESS) { if (m_info) { - delete[] m_info; + delete[] ((MxU8*) m_info); m_info = NULL; } @@ -157,7 +157,7 @@ MxResult MxBitmap::ImportBitmap(MxBitmap* p_bitmap) done: if (result != SUCCESS) { if (m_info) { - delete[] m_info; + delete[] ((MxU8*) m_info); m_info = NULL; } @@ -249,7 +249,7 @@ MxResult MxBitmap::LoadFile(HANDLE p_handle) done: if (result != SUCCESS) { if (m_info) { - delete[] m_info; + delete[] ((MxU8*) m_info); m_info = NULL; } From 561825f6a0ff0ad27fbd88052e45f985c869be5f Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 14 May 2025 21:40:12 +0200 Subject: [PATCH 2/2] Apply some enums to CONFIG (#1483) --- CONFIG/config.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONFIG/config.cpp b/CONFIG/config.cpp index f939d801..13a80e7f 100644 --- a/CONFIG/config.cpp +++ b/CONFIG/config.cpp @@ -349,17 +349,17 @@ DWORD CConfigApp::GetConditionalDeviceRenderBitDepth() const if (GetHardwareDeviceColorModel()) { return 0; } - return m_device->m_HELDesc.dwDeviceRenderBitDepth & 0x800; + return m_device->m_HELDesc.dwDeviceRenderBitDepth & DDBD_8; } // FUNCTION: CONFIG 0x004037e0 DWORD CConfigApp::GetDeviceRenderBitStatus() const { if (GetHardwareDeviceColorModel()) { - return m_device->m_HWDesc.dwDeviceRenderBitDepth & 0x400; + return m_device->m_HWDesc.dwDeviceRenderBitDepth & DDBD_16; } else { - return m_device->m_HELDesc.dwDeviceRenderBitDepth & 0x400; + return m_device->m_HELDesc.dwDeviceRenderBitDepth & DDBD_16; } }