Made mipmap assigning safer, should fix bug #349

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@960 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2003-05-12 00:44:49 +00:00
parent 4c0d125091
commit ee0339e0b8
+15 -11
View File
@@ -988,19 +988,23 @@ PostProcessQueue (register VIEW_STATE view_state, register SIZE scroll_x,
// enqueues drawcommand to assign next (smaller) zoom
// level image as mipmap, needed for trilinear scaling
TFB_DrawCommand DC;
TFB_Image *mmimg =
((PFRAME_DESC)SetEquFrameIndex (
PFRAME_DESC frame =
(PFRAME_DESC)SetAbsFrameIndex (
ElementPtr->next.image.farray
[index + 1],
ElementPtr->next.image.frame))->image;
DC.Type = TFB_DRAWCOMMANDTYPE_SETMIPMAP;
DC.data.setmipmap.image = ((PFRAME_DESC)ElementPtr->next.image.frame)->image;
LockMutex (mmimg->mutex);
DC.data.setmipmap.mipmap = mmimg->NormalImg;
UnlockMutex (mmimg->mutex);
TFB_EnqueueDrawCommand (&DC);
GetFrameIndex (ElementPtr->next.image.frame));
if (frame && frame->image)
{
TFB_DrawCommand DC;
TFB_Image *mmimg = frame->image;
DC.Type = TFB_DRAWCOMMANDTYPE_SETMIPMAP;
DC.data.setmipmap.image = ((PFRAME_DESC)ElementPtr->next.image.frame)->image;
LockMutex (mmimg->mutex);
DC.data.setmipmap.mipmap = mmimg->NormalImg;
UnlockMutex (mmimg->mutex);
TFB_EnqueueDrawCommand (&DC);
}
}
#endif
}