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

oldstable
Vitaliy Margolen 2006-12-29 12:25:25 -07:00 committed by Alexandre Julliard
parent 3af121230b
commit f9e5c12019
1 changed files with 5 additions and 0 deletions

View File

@ -1437,6 +1437,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
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_CreateAdditionalSwapChain(IWineD3DDevic
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);
}