wined3d: Pass a struct wined3d_output pointer to wined3d_swapchain_state_resize_target().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8dc3e01d51
commit
be5be58769
|
@ -189,7 +189,6 @@ static HRESULT dxgi_swapchain_resize_target(IDXGISwapChain1 *swapchain,
|
|||
return hr;
|
||||
dxgi_output = unsafe_impl_from_IDXGIOutput(output);
|
||||
adapter = dxgi_output->adapter;
|
||||
IDXGIOutput_Release(output);
|
||||
|
||||
TRACE("Mode: %s.\n", debug_dxgi_mode(target_mode_desc));
|
||||
|
||||
|
@ -198,7 +197,10 @@ static HRESULT dxgi_swapchain_resize_target(IDXGISwapChain1 *swapchain,
|
|||
|
||||
wined3d_display_mode_from_dxgi(&mode, target_mode_desc);
|
||||
|
||||
return wined3d_swapchain_state_resize_target(state, adapter->factory->wined3d, adapter->ordinal, &mode);
|
||||
hr = wined3d_swapchain_state_resize_target(state, adapter->factory->wined3d,
|
||||
dxgi_output->wined3d_output, &mode);
|
||||
IDXGIOutput_Release(output);
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HWND d3d11_swapchain_get_hwnd(struct d3d11_swapchain *swapchain)
|
||||
|
|
|
@ -1452,14 +1452,15 @@ static HRESULT wined3d_swapchain_state_set_display_mode(struct wined3d_swapchain
|
|||
}
|
||||
|
||||
HRESULT CDECL wined3d_swapchain_state_resize_target(struct wined3d_swapchain_state *state,
|
||||
struct wined3d *wined3d, unsigned int adapter_idx, const struct wined3d_display_mode *mode)
|
||||
struct wined3d *wined3d, struct wined3d_output *output,
|
||||
const struct wined3d_display_mode *mode)
|
||||
{
|
||||
struct wined3d_display_mode actual_mode;
|
||||
RECT original_window_rect, window_rect;
|
||||
HWND window;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("state %p, wined3d %p, adapter_idx %u, mode %p.\n", state, wined3d, adapter_idx, mode);
|
||||
TRACE("state %p, wined3d %p, output %p, mode %p.\n", state, wined3d, output, mode);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
|
@ -1479,7 +1480,7 @@ HRESULT CDECL wined3d_swapchain_state_resize_target(struct wined3d_swapchain_sta
|
|||
else if (state->desc.flags & WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH)
|
||||
{
|
||||
actual_mode = *mode;
|
||||
if (FAILED(hr = wined3d_swapchain_state_set_display_mode(state, wined3d, adapter_idx, &actual_mode)))
|
||||
if (FAILED(hr = wined3d_swapchain_state_set_display_mode(state, wined3d, 0, &actual_mode)))
|
||||
{
|
||||
wined3d_mutex_unlock();
|
||||
return hr;
|
||||
|
@ -1488,7 +1489,7 @@ HRESULT CDECL wined3d_swapchain_state_resize_target(struct wined3d_swapchain_sta
|
|||
}
|
||||
else
|
||||
{
|
||||
if (FAILED(hr = wined3d_get_adapter_display_mode(wined3d, adapter_idx, &actual_mode, NULL)))
|
||||
if (FAILED(hr = wined3d_get_adapter_display_mode(wined3d, 0, &actual_mode, NULL)))
|
||||
{
|
||||
ERR("Failed to get display mode, hr %#x.\n", hr);
|
||||
wined3d_mutex_unlock();
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
|
||||
@ cdecl wined3d_swapchain_state_create(ptr ptr ptr long ptr)
|
||||
@ cdecl wined3d_swapchain_state_destroy(ptr)
|
||||
@ cdecl wined3d_swapchain_state_resize_target(ptr ptr long ptr)
|
||||
@ cdecl wined3d_swapchain_state_resize_target(ptr ptr ptr ptr)
|
||||
@ cdecl wined3d_swapchain_state_set_fullscreen(ptr ptr ptr ptr ptr)
|
||||
|
||||
@ cdecl wined3d_texture_add_dirty_region(ptr long ptr)
|
||||
|
|
|
@ -2762,7 +2762,8 @@ HRESULT __cdecl wined3d_swapchain_state_create(const struct wined3d_swapchain_de
|
|||
HWND window, struct wined3d *wined3d, unsigned int adapter_idx, struct wined3d_swapchain_state **state);
|
||||
void __cdecl wined3d_swapchain_state_destroy(struct wined3d_swapchain_state *state);
|
||||
HRESULT __cdecl wined3d_swapchain_state_resize_target(struct wined3d_swapchain_state *state,
|
||||
struct wined3d *wined3d, unsigned int adapter_idx, const struct wined3d_display_mode *mode);
|
||||
struct wined3d *wined3d, struct wined3d_output *output,
|
||||
const struct wined3d_display_mode *mode);
|
||||
HRESULT __cdecl wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_state *state,
|
||||
const struct wined3d_swapchain_desc *desc, struct wined3d *wined3d,
|
||||
struct wined3d_output *output, const struct wined3d_display_mode *mode);
|
||||
|
|
Loading…
Reference in New Issue