Re: [PATCH v3 0/6] MR11231: dxgi: Create a windowed swapchain instead when the fullscreen mode scanline order or scaling is invalid.
```diff @@ -662,12 +662,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenDesc(IDXGISwapChai wined3d_swapchain_get_desc(swapchain->wined3d_swapchain, &wined3d_desc); wined3d_mutex_unlock();
- FIXME("Ignoring ScanlineOrdering and Scaling.\n"); - - desc->RefreshRate.Numerator = wined3d_desc.refresh_rate; - desc->RefreshRate.Denominator = 1; - desc->ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; - desc->Scaling = DXGI_MODE_SCALING_UNSPECIFIED; + *desc = swapchain->fullscreen_desc; desc->Windowed = wined3d_desc.windowed;
return S_OK; ```
It's not wrong, but I'd implement this like d3d12_swapchain_GetFullscreenDesc(). I.e., using wined3d_swapchain_state_is_windowed().
```diff -BOOL dxgi_validate_swapchain_desc(const DXGI_SWAP_CHAIN_DESC1 *desc); +HRESULT dxgi_validate_swapchain_desc(const DXGI_SWAP_CHAIN_DESC1 *desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc); ```
The "fullscreen_desc" validation here feels a little awkward; it's essentially a separate function glued to the end, and then the caller distinguishes between those based on the error code. I think we might as well introduce a separate dxgi_validate_swapchain_fullscreen_desc() function; it would make it a little clearer what dxgi_factory_CreateSwapChainForHwnd() is doing, at least. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11231#note_144540
participants (1)
-
Henri Verbeet (@hverbeet)