Vitaliy Margolen : wined3d: Clip mouse after resolution change while creating default swap chain.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 2 06:46:00 CST 2007


Module: wine
Branch: master
Commit: f9e5c12019e4aa64c556abc5b8579505cf42af09
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f9e5c12019e4aa64c556abc5b8579505cf42af09

Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date:   Fri Dec 29 12:25:25 2006 -0700

wined3d: Clip mouse after resolution change while creating default swap chain.

---

 dlls/wined3d/device.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index cfb3354..58f512d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1437,6 +1437,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         DEVMODEW devmode;
         HDC      hdc;
         int      bpp = 0;
+        RECT     clip_rc;
 
         /* Get info on the current display setup */
         hdc = CreateDCA("DISPLAY", NULL, NULL, NULL);
@@ -1462,6 +1463,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         This->ddraw_width = devmode.dmPelsWidth;
         This->ddraw_height = devmode.dmPelsHeight;
         This->ddraw_format = *(pPresentationParameters->BackBufferFormat);
+
+        /* And finally clip mouse to our screen */
+        SetRect(&clip_rc, 0, 0, devmode.dmPelsWidth, devmode.dmPelsHeight);
+        ClipCursor(&clip_rc);
     }
 
 




More information about the wine-cvs mailing list