From 41de5779a551be3e861756d3fc6b78052d549a49 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 6 Feb 2024 22:48:13 +0100 Subject: [PATCH] reformat --- CONFIG/config.cpp | 2 +- LEGO1/mxdirectx/mxdirect3d.cpp | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CONFIG/config.cpp b/CONFIG/config.cpp index cd1f86fc..74c17005 100644 --- a/CONFIG/config.cpp +++ b/CONFIG/config.cpp @@ -11,7 +11,7 @@ DECOMP_SIZE_ASSERT(CWinApp, 0xc4) DECOMP_SIZE_ASSERT(CConfigApp, 0x108) -DECOMP_STATIC_ASSERT(offsetof(CConfigApp, m_display_bit_depth) == 0xd0) +DECOMP_STATIC_ASSERT(offsetof(CConfigApp, m_display_bit_depth) == 0xd0) // FIXME: are these tags correct? // FIXME: how to tag static in-method variables? diff --git a/LEGO1/mxdirectx/mxdirect3d.cpp b/LEGO1/mxdirectx/mxdirect3d.cpp index da1ed966..411d2501 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, - ((DWORD*)(p_device->m_guid))[0], - ((DWORD*)(p_device->m_guid))[1], - ((DWORD*)(p_device->m_guid))[2], - ((DWORD*)(p_device->m_guid))[3] + ((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; } @@ -1002,11 +1002,11 @@ int MxDeviceEnumerate::FUN_1009d0d0() int MxDeviceEnumerate::SupportsMMX() { if (!SupportsCPUID()) { - return 0; - } + return 0; + } int supports_mmx; #ifdef _MSC_VER - __asm { + __asm { mov eax, 0x0 ; EAX=0: Highest Function Parameter and Manufacturer ID #if _MSC_VER > 1100 cpuid ; Run CPUID @@ -1025,17 +1025,17 @@ int MxDeviceEnumerate::SupportsMMX() bt edx, 0x17 ; Test bit 0x17 (23): MMX instructions (64-bit SIMD) (Store in CF) adc eax, eax ; Add with carry: EAX = EAX + EAX + CF = CF mov supports_mmx, eax ; Save eax into C variable - } + } #else - __asm__("movl $0x0, %%eax\n\t" // EAX=0: Highest Function Parameter and Manufacturer ID - "cpuid\n\t" // Run CPUID\n" - "mov $0x1, %%eax\n\t" // EAX=1: Processor Info and Feature Bits (unused) - "cpuid\n\t" // Run CPUID - "xorl %%eax, %%eax\n\t" // Zero EAX register - "btl $0x15, %%edx\n\t" // Test bit 0x17 (23): MMX instructions (64-bit SIMD) (Store in CF) - "adc %%eax, %%eax" // Add with carry: EAX = EAX + EAX + CF = CF - : "=a"(supports_mmx) // supports_mmx == EAX - ); + __asm__("movl $0x0, %%eax\n\t" // EAX=0: Highest Function Parameter and Manufacturer ID + "cpuid\n\t" // Run CPUID\n" + "mov $0x1, %%eax\n\t" // EAX=1: Processor Info and Feature Bits (unused) + "cpuid\n\t" // Run CPUID + "xorl %%eax, %%eax\n\t" // Zero EAX register + "btl $0x15, %%edx\n\t" // Test bit 0x17 (23): MMX instructions (64-bit SIMD) (Store in CF) + "adc %%eax, %%eax" // Add with carry: EAX = EAX + EAX + CF = CF + : "=a"(supports_mmx) // supports_mmx == EAX + ); #endif return supports_mmx; }