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:
+14
-10
@@ -988,19 +988,23 @@ PostProcessQueue (register VIEW_STATE view_state, register SIZE scroll_x,
|
|||||||
// enqueues drawcommand to assign next (smaller) zoom
|
// enqueues drawcommand to assign next (smaller) zoom
|
||||||
// level image as mipmap, needed for trilinear scaling
|
// level image as mipmap, needed for trilinear scaling
|
||||||
|
|
||||||
TFB_DrawCommand DC;
|
PFRAME_DESC frame =
|
||||||
TFB_Image *mmimg =
|
(PFRAME_DESC)SetAbsFrameIndex (
|
||||||
((PFRAME_DESC)SetEquFrameIndex (
|
|
||||||
ElementPtr->next.image.farray
|
ElementPtr->next.image.farray
|
||||||
[index + 1],
|
[index + 1],
|
||||||
ElementPtr->next.image.frame))->image;
|
GetFrameIndex (ElementPtr->next.image.frame));
|
||||||
|
|
||||||
DC.Type = TFB_DRAWCOMMANDTYPE_SETMIPMAP;
|
if (frame && frame->image)
|
||||||
DC.data.setmipmap.image = ((PFRAME_DESC)ElementPtr->next.image.frame)->image;
|
{
|
||||||
LockMutex (mmimg->mutex);
|
TFB_DrawCommand DC;
|
||||||
DC.data.setmipmap.mipmap = mmimg->NormalImg;
|
TFB_Image *mmimg = frame->image;
|
||||||
UnlockMutex (mmimg->mutex);
|
DC.Type = TFB_DRAWCOMMANDTYPE_SETMIPMAP;
|
||||||
TFB_EnqueueDrawCommand (&DC);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user