wined3d: Use SetupFullscreenWindow() to make the window fullscreen.
This commit is contained in:
parent
6112522122
commit
4352934b84
|
@ -1512,7 +1512,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
|
|||
HDC hdc;
|
||||
int bpp = 0;
|
||||
RECT clip_rc;
|
||||
DWORD style;
|
||||
|
||||
/* Get info on the current display setup */
|
||||
hdc = GetDC(0);
|
||||
|
@ -1528,19 +1527,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
|
|||
MultiByteToWideChar(CP_ACP, 0, "Gamers CG", -1, devmode.dmDeviceName, CCHDEVICENAME);
|
||||
ChangeDisplaySettingsExW(devmode.dmDeviceName, &devmode, object->win_handle, CDS_FULLSCREEN, NULL);
|
||||
|
||||
/* Make popup window, remove caption and borders */
|
||||
style = GetWindowLongW(object->win_handle, GWL_STYLE);
|
||||
style &= ~WS_CAPTION;
|
||||
SetWindowLongW(object->win_handle, GWL_STYLE, style | WS_POPUP);
|
||||
SetWindowPos(object->win_handle, HWND_TOP, 0, 0,
|
||||
*(pPresentationParameters->BackBufferWidth),
|
||||
*(pPresentationParameters->BackBufferHeight), SWP_FRAMECHANGED);
|
||||
|
||||
/* For GetDisplayMode */
|
||||
This->ddraw_width = devmode.dmPelsWidth;
|
||||
This->ddraw_height = devmode.dmPelsHeight;
|
||||
This->ddraw_format = *(pPresentationParameters->BackBufferFormat);
|
||||
|
||||
IWineD3DDeviceImpl_SetupFullscreenWindow(iface, object->win_handle);
|
||||
|
||||
/* And finally clip mouse to our screen */
|
||||
SetRect(&clip_rc, 0, 0, devmode.dmPelsWidth, devmode.dmPelsHeight);
|
||||
ClipCursor(&clip_rc);
|
||||
|
|
Loading…
Reference in New Issue