diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 0d7ab0172a2..f9150384a33 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -341,6 +341,11 @@ static inline D3DMULTISAMPLE_TYPE d3dmultisample_type_from_wined3d(enum wined3d_ return (D3DMULTISAMPLE_TYPE)type; } +static inline D3DSCANLINEORDERING d3dscanlineordering_from_wined3d(enum wined3d_scanline_ordering ordering) +{ + return (D3DSCANLINEORDERING)ordering; +} + static inline unsigned int map_access_from_usage(unsigned int usage) { if (usage & D3DUSAGE_WRITEONLY) @@ -394,4 +399,9 @@ static inline enum wined3d_multisample_type wined3d_multisample_type_from_d3d(D3 return (enum wined3d_multisample_type)type; } +static inline enum wined3d_scanline_ordering wined3d_scanline_ordering_from_d3d(D3DSCANLINEORDERING ordering) +{ + return (enum wined3d_scanline_ordering)ordering; +} + #endif /* __WINE_D3D9_PRIVATE_H */ diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 3f81f1474aa..eb204ca088f 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1030,7 +1030,7 @@ static HRESULT d3d9_device_reset(struct d3d9_device *device, wined3d_mode.height = mode->Height; wined3d_mode.refresh_rate = mode->RefreshRate; wined3d_mode.format_id = wined3dformat_from_d3dformat(mode->Format); - wined3d_mode.scanline_ordering = mode->ScanLineOrdering; + wined3d_mode.scanline_ordering = wined3d_scanline_ordering_from_d3d(mode->ScanLineOrdering); } if (!wined3d_swapchain_desc_from_present_parameters(&swapchain_desc, present_parameters, extended)) @@ -4370,7 +4370,7 @@ static HRESULT WINAPI d3d9_device_GetDisplayModeEx(IDirect3DDevice9Ex *iface, mode->Height = wined3d_mode.height; mode->RefreshRate = wined3d_mode.refresh_rate; mode->Format = d3dformat_from_wined3dformat(wined3d_mode.format_id); - mode->ScanLineOrdering = wined3d_mode.scanline_ordering; + mode->ScanLineOrdering = d3dscanlineordering_from_wined3d(wined3d_mode.scanline_ordering); } return hr; diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index 6a1745ee1cb..41065796dd4 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -525,7 +525,7 @@ static UINT WINAPI d3d9_GetAdapterModeCountEx(IDirect3D9Ex *iface, wined3d_mutex_lock(); count = wined3d_output_get_mode_count(d3d9->wined3d_outputs[output_idx], - wined3dformat_from_d3dformat(filter->Format), filter->ScanLineOrdering); + wined3dformat_from_d3dformat(filter->Format), wined3d_scanline_ordering_from_d3d(filter->ScanLineOrdering)); wined3d_mutex_unlock(); return count; @@ -550,9 +550,8 @@ static HRESULT WINAPI d3d9_EnumAdapterModesEx(IDirect3D9Ex *iface, return D3DERR_INVALIDCALL; wined3d_mutex_lock(); - hr = wined3d_output_get_mode(d3d9->wined3d_outputs[output_idx], - wined3dformat_from_d3dformat(filter->Format), filter->ScanLineOrdering, mode_idx, - &wined3d_mode); + hr = wined3d_output_get_mode(d3d9->wined3d_outputs[output_idx], wined3dformat_from_d3dformat(filter->Format), + wined3d_scanline_ordering_from_d3d(filter->ScanLineOrdering), mode_idx, &wined3d_mode); wined3d_mutex_unlock(); if (SUCCEEDED(hr)) @@ -561,7 +560,7 @@ static HRESULT WINAPI d3d9_EnumAdapterModesEx(IDirect3D9Ex *iface, mode->Height = wined3d_mode.height; mode->RefreshRate = wined3d_mode.refresh_rate; mode->Format = d3dformat_from_wined3dformat(wined3d_mode.format_id); - mode->ScanLineOrdering = wined3d_mode.scanline_ordering; + mode->ScanLineOrdering = d3dscanlineordering_from_wined3d(wined3d_mode.scanline_ordering); } return hr; @@ -596,7 +595,7 @@ static HRESULT WINAPI d3d9_GetAdapterDisplayModeEx(IDirect3D9Ex *iface, mode->Height = wined3d_mode.height; mode->RefreshRate = wined3d_mode.refresh_rate; mode->Format = d3dformat_from_wined3dformat(wined3d_mode.format_id); - mode->ScanLineOrdering = wined3d_mode.scanline_ordering; + mode->ScanLineOrdering = d3dscanlineordering_from_wined3d(wined3d_mode.scanline_ordering); } return hr; diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index be9c55ac3ef..8d6cff982d3 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -320,7 +320,7 @@ static HRESULT WINAPI d3d9_swapchain_GetDisplayModeEx(IDirect3DSwapChain9Ex *ifa mode->Height = wined3d_mode.height; mode->RefreshRate = wined3d_mode.refresh_rate; mode->Format = d3dformat_from_wined3dformat(wined3d_mode.format_id); - mode->ScanLineOrdering = wined3d_mode.scanline_ordering; + mode->ScanLineOrdering = d3dscanlineordering_from_wined3d(wined3d_mode.scanline_ordering); } return hr;