Stefan Dösinger : wined3d: Read the framebuffer size from the surface, not the window.
Module: wine Branch: master Commit: 58a761a88b8f236fd923d6d2d4cd562098034c88 URL: http://source.winehq.org/git/wine.git/?a=commit;h=58a761a88b8f236fd923d6d2d4... Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Nov 10 22:36:28 2007 +0100 wined3d: Read the framebuffer size from the surface, not the window. --- dlls/wined3d/state.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 559a9fd..296c5ce 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3598,12 +3598,15 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContex } static void scissorrect(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { - IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *) stateblock->wineD3DDevice->swapchains[0]; RECT *pRect = &stateblock->scissorRect; RECT windowRect; UINT winHeight; - GetClientRect(swapchain->win_handle, &windowRect); + windowRect.left = 0; + windowRect.top = 0; + windowRect.right = ((IWineD3DSurfaceImpl *) stateblock->wineD3DDevice->render_targets[0])->currentDesc.Width; + windowRect.bottom = ((IWineD3DSurfaceImpl *) stateblock->wineD3DDevice->render_targets[0])->currentDesc.Height; + /* Warning: glScissor uses window coordinates, not viewport coordinates, so our viewport correction does not apply * Warning2: Even in windowed mode the coords are relative to the window, not the screen */
participants (1)
-
Alexandre Julliard