Fixed MinGW build.

This commit is contained in:
bkaradzic 2013-04-07 13:44:10 -07:00
parent 4ab0874d53
commit dc8d2c38f3
2 changed files with 8 additions and 1 deletions

View File

@ -1603,7 +1603,7 @@ namespace bgfx
if (ptr == NonLocalAllocator::invalidBlock) if (ptr == NonLocalAllocator::invalidBlock)
{ {
IndexBufferHandle indexBufferHandle = { m_indexBufferHandle.alloc() }; IndexBufferHandle indexBufferHandle = { m_indexBufferHandle.alloc() };
BX_WARN(invalidHandle != handle.idx, "Failed to allocate dynamic index buffer handle."); BX_WARN(invalidHandle != indexBufferHandle.idx, "Failed to allocate index buffer handle.");
if (indexBufferHandle.idx == invalidHandle) if (indexBufferHandle.idx == invalidHandle)
{ {
return handle; return handle;
@ -1618,6 +1618,12 @@ namespace bgfx
} }
handle.idx = m_dynamicIndexBufferHandle.alloc(); handle.idx = m_dynamicIndexBufferHandle.alloc();
BX_WARN(invalidHandle != handle.idx, "Failed to allocate dynamic index buffer handle.");
if (handle.idx == invalidHandle)
{
return handle;
}
DynamicIndexBuffer& dib = m_dynamicIndexBuffers[handle.idx]; DynamicIndexBuffer& dib = m_dynamicIndexBuffers[handle.idx];
dib.m_handle.idx = uint16_t(ptr>>32); dib.m_handle.idx = uint16_t(ptr>>32);
dib.m_offset = uint32_t(ptr); dib.m_offset = uint32_t(ptr);

View File

@ -7,6 +7,7 @@
#define __RENDERER_D3D_H__ #define __RENDERER_D3D_H__
#if BGFX_CONFIG_RENDERER_DIRECT3D9 #if BGFX_CONFIG_RENDERER_DIRECT3D9
# include <sal.h>
# include <dxerr.h> # include <dxerr.h>
# pragma comment(lib, "dxerr.lib") # pragma comment(lib, "dxerr.lib")
# define DX_CHECK_EXTRA_F " (%s): %s" # define DX_CHECK_EXTRA_F " (%s): %s"