mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Ignore failed assertions from d3drm unimplemented functions
This commit is contained in:
parent
382d24b097
commit
3204429cd4
@ -8,6 +8,25 @@ DECOMP_SIZE_ASSERT(TglSurface, 0x70);
|
||||
|
||||
using namespace Tgl;
|
||||
|
||||
#ifdef D3DRM_WINE
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#define d3drm_wine_assert(COND) \
|
||||
do { \
|
||||
if (!(COND)) { \
|
||||
SDL_Log( \
|
||||
"%s:%d Assertion failed: \"%s\" (ignored because wine-d3d does not implement it)", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
#COND \
|
||||
); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define d3drm_wine_assert(X) assert(X)
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// TglSurface
|
||||
|
||||
@ -126,11 +145,11 @@ BOOL TglSurface::Create(const CreateStruct& rCreateStruct, Renderer* pRenderer,
|
||||
|
||||
if (textureShadeCount != -1) {
|
||||
result = pRenderer->SetTextureDefaultShadeCount(textureShadeCount);
|
||||
assert(Succeeded(result));
|
||||
d3drm_wine_assert(Succeeded(result));
|
||||
}
|
||||
if (textureColorCount != -1) {
|
||||
result = pRenderer->SetTextureDefaultColorCount(textureColorCount);
|
||||
assert(Succeeded(result));
|
||||
d3drm_wine_assert(Succeeded(result));
|
||||
}
|
||||
|
||||
result = m_pDevice->SetColorModel(colorModel);
|
||||
@ -138,7 +157,7 @@ BOOL TglSurface::Create(const CreateStruct& rCreateStruct, Renderer* pRenderer,
|
||||
result = m_pDevice->SetShadingModel(shadingModel);
|
||||
assert(Succeeded(result));
|
||||
result = m_pDevice->SetShadeCount(shadeCount);
|
||||
assert(Succeeded(result));
|
||||
d3drm_wine_assert(Succeeded(result));
|
||||
result = m_pDevice->SetDither(dither);
|
||||
assert(Succeeded(result));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user