From 53fc3f6acc032884a9d450396b3635172074b123 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Mon, 26 Jun 2006 23:15:55 +0200 Subject: [PATCH] ddraw: Fix some compiler warnings. --- dlls/ddraw/device.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 9dfe344b4b3..a3436d921e1 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -1833,7 +1833,8 @@ Thunk_IDirect3DDeviceImpl_2_Begin(IDirect3DDevice2 *iface, case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break; case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break; default: - assert(0); /* Should never happen */ + ERR("Unexpected vertex type %d\n", dwVertexTypeDesc); + return DDERR_INVALIDPARAMS; /* Should never happen */ }; return IDirect3DDevice3_Begin(ICOM_INTERFACE(This, IDirect3DDevice3), @@ -1893,7 +1894,8 @@ Thunk_IDirect3DDeviceImpl_2_BeginIndexed(IDirect3DDevice2 *iface, case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break; case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break; default: - assert(0); /* Should never happen */ + ERR("Unexpected vertex type %d\n", d3dvtVertexType); + return DDERR_INVALIDPARAMS; /* Should never happen */ }; return IDirect3DDevice3_BeginIndexed(ICOM_INTERFACE(This,IDirect3DDevice3), @@ -2758,7 +2760,8 @@ Thunk_IDirect3DDeviceImpl_2_DrawPrimitive(IDirect3DDevice2 *iface, case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break; case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break; default: - assert(0); /* Should never happen */ + ERR("Unexpected vertex type %d\n", VertexType); + return DDERR_INVALIDPARAMS; /* Should never happen */ } return IDirect3DDevice7_DrawPrimitive(ICOM_INTERFACE(This, IDirect3DDevice7), @@ -2898,7 +2901,8 @@ Thunk_IDirect3DDeviceImpl_2_DrawIndexedPrimitive(IDirect3DDevice2 *iface, case D3DVT_LVERTEX: FVF = D3DFVF_LVERTEX; break; case D3DVT_TLVERTEX: FVF = D3DFVF_TLVERTEX; break; default: - assert(0); /* Should never happen */ + ERR("Unexpected vertex type %d\n", VertexType); + return DDERR_INVALIDPARAMS; /* Should never happen */ } return IDirect3DDevice7_DrawIndexedPrimitive(ICOM_INTERFACE(This, IDirect3DDevice7), -- 2.11.4.GIT