June 25, 2019 9:55 PM, "Józef Kucia" joseph.kucia@gmail.com wrote:
If possible, we would like to share more code with wined3d instead of copying wined3d_swapchain_set_fullscreen() to d3d12_swapchain_SetFullscreenState().
I've looked at doing this a couple of times. Some complications:
D3D12 doesn't use adapter_format_from_backbuffer_format(). The wined3d function turns message filtering on/off using wined3d_device. No equivalent of 'swapchain->d3d_mode = actual_mode' exists in the D3D12 version. The original window rect is always restored in DXGI but not wined3d. The Alt+Enter handler in wined3d_hook_proc() calls wined3d_swapchain_set_fullscreen() too.
No doubt it can be made to work through a common helper with some optional parameters. It will probably be a bit messy though. It depends on what's more important.
Conor