Selaa lähdekoodia

Fixed compiling DebugMem in Visual Studio.

Darryl Gough 13 vuotta sitten
vanhempi
sitoutus
c13e516b62
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 1 1
      gameplay/gameplay.vcxproj
  2. 2 2
      gameplay/src/DebugNew.cpp

+ 1 - 1
gameplay/gameplay.vcxproj

@@ -922,7 +922,7 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>USE_XINPUT;_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;GAMEPLAY_MEM_LEAK_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;GAMEPLAY_MEM_LEAK_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>$(ProjectDir)src;..\external-deps\lua\include;..\external-deps\bullet\include;..\external-deps\openal\include\AL;..\external-deps\alut\include\AL;..\external-deps\oggvorbis\include;..\external-deps\glew\include;..\external-deps\libpng\include;..\external-deps\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

+ 2 - 2
gameplay/src/DebugNew.cpp

@@ -106,7 +106,7 @@ void* debugAlloc(std::size_t size, const char* file, int line)
     mem += sizeof(MemoryAllocationRecord);
 
     rec->address = (unsigned long)mem;
-    rec->size = size;
+    rec->size = (unsigned int)size;
     rec->file = file;
     rec->line = line;
     rec->next = __memoryAllocations;
@@ -114,7 +114,7 @@ void* debugAlloc(std::size_t size, const char* file, int line)
 
     // Capture the stack frame (up to MAX_STACK_FRAMES) if we 
     // are running on Windows and the user has enabled it.
-#if defined(WIN32)
+#if defined(WIN32) && defined(_M_IX86)
     rec->trackStackTrace = __trackStackTrace;
     if (rec->trackStackTrace)
     {