mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
ddraw: Remove a useless viewport callback.
This commit is contained in:
parent
14399f6130
commit
fee9c1f2b5
@ -4533,7 +4533,6 @@ static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3
|
|||||||
object->ref = 1;
|
object->ref = 1;
|
||||||
object->ddraw = ddraw_from_d3d3(iface);
|
object->ddraw = ddraw_from_d3d3(iface);
|
||||||
object->use_vp2 = 0xff;
|
object->use_vp2 = 0xff;
|
||||||
object->activate = viewport_activate;
|
|
||||||
|
|
||||||
TRACE("Created viewport %p.\n", object);
|
TRACE("Created viewport %p.\n", object);
|
||||||
*viewport = (IDirect3DViewport3 *)object;
|
*viewport = (IDirect3DViewport3 *)object;
|
||||||
|
@ -585,9 +585,6 @@ struct IDirect3DViewportImpl
|
|||||||
D3DVIEWPORT2 vp2;
|
D3DVIEWPORT2 vp2;
|
||||||
} viewports;
|
} viewports;
|
||||||
|
|
||||||
/* Activation function */
|
|
||||||
void (*activate)(IDirect3DViewportImpl*, BOOL);
|
|
||||||
|
|
||||||
/* Field used to chain viewports together */
|
/* Field used to chain viewports together */
|
||||||
IDirect3DViewportImpl *next;
|
IDirect3DViewportImpl *next;
|
||||||
|
|
||||||
|
@ -1872,7 +1872,7 @@ IDirect3DDeviceImpl_3_SetCurrentViewport(IDirect3DDevice3 *iface,
|
|||||||
|
|
||||||
/* Activate this viewport */
|
/* Activate this viewport */
|
||||||
This->current_viewport->active_device = This;
|
This->current_viewport->active_device = This;
|
||||||
This->current_viewport->activate(This->current_viewport, FALSE);
|
viewport_activate(This->current_viewport, FALSE);
|
||||||
|
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
return D3D_OK;
|
return D3D_OK;
|
||||||
|
@ -103,7 +103,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
|
|||||||
|
|
||||||
/* Activate the viewport */
|
/* Activate the viewport */
|
||||||
lpViewport->active_device = lpDevice;
|
lpViewport->active_device = lpDevice;
|
||||||
lpViewport->activate(lpViewport, FALSE);
|
viewport_activate(lpViewport, FALSE);
|
||||||
|
|
||||||
TRACE("ExecuteData :\n");
|
TRACE("ExecuteData :\n");
|
||||||
if (TRACE_ON(d3d7))
|
if (TRACE_ON(d3d7))
|
||||||
|
@ -325,8 +325,9 @@ IDirect3DViewportImpl_SetViewport(IDirect3DViewport3 *iface,
|
|||||||
if (This->active_device) {
|
if (This->active_device) {
|
||||||
IDirect3DDevice3 *d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl;
|
IDirect3DDevice3 *d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl;
|
||||||
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
||||||
if (current_viewport) {
|
if (current_viewport)
|
||||||
if ((IDirect3DViewportImpl *)current_viewport == This) This->activate(This, FALSE);
|
{
|
||||||
|
if ((IDirect3DViewportImpl *)current_viewport == This) viewport_activate(This, FALSE);
|
||||||
IDirect3DViewport3_Release(current_viewport);
|
IDirect3DViewport3_Release(current_viewport);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -697,7 +698,7 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
|
|||||||
|
|
||||||
/* Need to temporarily activate viewport to clear it. Previously active one will be restored
|
/* Need to temporarily activate viewport to clear it. Previously active one will be restored
|
||||||
afterwards. */
|
afterwards. */
|
||||||
This->activate(This, TRUE);
|
viewport_activate(This, TRUE);
|
||||||
|
|
||||||
hr = IDirect3DDevice7_Clear((IDirect3DDevice7 *)This->active_device, dwCount, lpRects,
|
hr = IDirect3DDevice7_Clear((IDirect3DDevice7 *)This->active_device, dwCount, lpRects,
|
||||||
dwFlags & (D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET), color, 1.0, 0x00000000);
|
dwFlags & (D3DCLEAR_ZBUFFER | D3DCLEAR_TARGET), color, 1.0, 0x00000000);
|
||||||
@ -705,7 +706,7 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
|
|||||||
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
||||||
if(current_viewport) {
|
if(current_viewport) {
|
||||||
IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)current_viewport;
|
IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)current_viewport;
|
||||||
vp->activate(vp, TRUE);
|
viewport_activate(vp, TRUE);
|
||||||
IDirect3DViewport3_Release(current_viewport);
|
IDirect3DViewport3_Release(current_viewport);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -978,8 +979,9 @@ IDirect3DViewportImpl_SetViewport2(IDirect3DViewport3 *iface,
|
|||||||
if (This->active_device) {
|
if (This->active_device) {
|
||||||
IDirect3DDevice3 *d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl;
|
IDirect3DDevice3 *d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl;
|
||||||
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
||||||
if (current_viewport) {
|
if (current_viewport)
|
||||||
if ((IDirect3DViewportImpl *)current_viewport == This) This->activate(This, FALSE);
|
{
|
||||||
|
if ((IDirect3DViewportImpl *)current_viewport == This) viewport_activate(This, FALSE);
|
||||||
IDirect3DViewport3_Release(current_viewport);
|
IDirect3DViewport3_Release(current_viewport);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1074,16 +1076,16 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
|
|||||||
return D3DERR_VIEWPORTHASNODEVICE;
|
return D3DERR_VIEWPORTHASNODEVICE;
|
||||||
}
|
}
|
||||||
d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl;
|
d3d_device3 = (IDirect3DDevice3 *)&This->active_device->IDirect3DDevice3_vtbl;
|
||||||
/* Need to temporarily activate viewport to clear it. Previously active one will be restored
|
/* Need to temporarily activate viewport to clear it. Previously active
|
||||||
afterwards. */
|
* one will be restored afterwards. */
|
||||||
This->activate(This, TRUE);
|
viewport_activate(This, TRUE);
|
||||||
|
|
||||||
hr = IDirect3DDevice7_Clear((IDirect3DDevice7 *)This->active_device,
|
hr = IDirect3DDevice7_Clear((IDirect3DDevice7 *)This->active_device,
|
||||||
dwCount, lpRects, dwFlags, dwColor, dvZ, dwStencil);
|
dwCount, lpRects, dwFlags, dwColor, dvZ, dwStencil);
|
||||||
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
IDirect3DDevice3_GetCurrentViewport(d3d_device3, ¤t_viewport);
|
||||||
if(current_viewport) {
|
if(current_viewport) {
|
||||||
IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)current_viewport;
|
IDirect3DViewportImpl *vp = (IDirect3DViewportImpl *)current_viewport;
|
||||||
vp->activate(vp, TRUE);
|
viewport_activate(vp, TRUE);
|
||||||
IDirect3DViewport3_Release(current_viewport);
|
IDirect3DViewport3_Release(current_viewport);
|
||||||
}
|
}
|
||||||
LeaveCriticalSection(&ddraw_cs);
|
LeaveCriticalSection(&ddraw_cs);
|
||||||
|
Loading…
Reference in New Issue
Block a user