From 4b68b6ffcf30b4b2fbdaaf7a50e4eb917000493a Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 6 Feb 2024 22:20:14 +0100 Subject: [PATCH] style fixes --- CMakeLists.txt | 2 +- CONFIG/AboutDlg.cpp | 4 ++-- CONFIG/config.cpp | 2 +- LEGO1/mxdirectx/mxdirect3d.cpp | 15 ++++++++------- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 665a61ac..c6036c51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ message(STATUS "MSVC for decompilation: ${MSVC_FOR_DECOMP}") option(ISLE_WERROR "Treat warnings as errors" OFF) option(ISLE_BUILD_APP "Build ISLE.EXE application" ON) -cmake_dependent_option(ISLE_BUILD_CONFIG "Build ISLE.EXE application" ON "NOT MINGW" OFF) +cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "NOT MINGW" OFF) option(ISLE_USE_SMARTHEAP "Build with SmartHeap" ${MSVC_FOR_DECOMP}) option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" ON) cmake_dependent_option(ISLE_USE_DX5_LIBS "Build with internal DirectX 5 SDK Libraries" ON ISLE_USE_DX5 OFF) diff --git a/CONFIG/AboutDlg.cpp b/CONFIG/AboutDlg.cpp index 208e6c9f..16b1aab2 100644 --- a/CONFIG/AboutDlg.cpp +++ b/CONFIG/AboutDlg.cpp @@ -12,13 +12,13 @@ CAboutDialog::CAboutDialog() : CDialog(IDD) // FUNCTION: CONFIG 0x00403c90 void CAboutDialog::BeginModalState() { - ::EnableWindow(this->m_hWnd, FALSE); + ::EnableWindow(m_hWnd, FALSE); } // FUNCTION: CONFIG 0x00403ca0 void CAboutDialog::EndModalState() { - ::EnableWindow(this->m_hWnd, TRUE); + ::EnableWindow(m_hWnd, TRUE); } // FUNCTION: CONFIG 0x00403d20 diff --git a/CONFIG/config.cpp b/CONFIG/config.cpp index da1e7fb5..ccc01522 100644 --- a/CONFIG/config.cpp +++ b/CONFIG/config.cpp @@ -52,7 +52,7 @@ BOOL CConfigApp::InitInstance() CConfigCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); if (_stricmp(afxCurrentAppName, "config") == 0) { - currentConfigApp->m_run_config_dialog = TRUE; + m_run_config_dialog = TRUE; } m_device_enumerator = new MxDeviceEnumerate; if (m_device_enumerator->DoEnumerate()) { diff --git a/LEGO1/mxdirectx/mxdirect3d.cpp b/LEGO1/mxdirectx/mxdirect3d.cpp index f79b0e3a..da1ed966 100644 --- a/LEGO1/mxdirectx/mxdirect3d.cpp +++ b/LEGO1/mxdirectx/mxdirect3d.cpp @@ -945,10 +945,10 @@ int MxDeviceEnumerate::FormatDeviceName(char* p_buffer, const MxDriver* p_driver p_buffer, "%d 0x%x 0x%x 0x%x 0x%x", number, - p_device->m_guid->Data1, - *(DWORD*) &p_device->m_guid->Data2, - *(DWORD*) &p_device->m_guid->Data4[0], - *(DWORD*) &p_device->m_guid->Data4[4] + ((DWORD*)(p_device->m_guid))[0], + ((DWORD*)(p_device->m_guid))[1], + ((DWORD*)(p_device->m_guid))[2], + ((DWORD*)(p_device->m_guid))[3] ); return 0; } @@ -1001,8 +1001,10 @@ int MxDeviceEnumerate::FUN_1009d0d0() // FUNCTION: LEGO1 0x1009d1a0 int MxDeviceEnumerate::SupportsMMX() { - int supports_mmx = SupportsCPUID(); - if (supports_mmx) { + if (!SupportsCPUID()) { + return 0; + } + int supports_mmx; #ifdef _MSC_VER __asm { mov eax, 0x0 ; EAX=0: Highest Function Parameter and Manufacturer ID @@ -1035,7 +1037,6 @@ int MxDeviceEnumerate::SupportsMMX() : "=a"(supports_mmx) // supports_mmx == EAX ); #endif - } return supports_mmx; }