From: Charles Davis cdavis5x@gmail.com
Signed-off-by: Chip Davis cdavis@codeweavers.com --- dlls/d3d9/device.c | 51 +++++++++++++++++++++++-------------------- dlls/d3d9/directx.c | 27 ++++++++++++----------- dlls/d3d9/query.c | 4 ++-- dlls/d3d9/surface.c | 2 +- dlls/d3d9/swapchain.c | 2 +- dlls/d3d9/texture.c | 4 ++-- 6 files changed, 47 insertions(+), 43 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 61cb505d77a..a82831e8fd0 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -44,7 +44,7 @@ D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) BYTE *c = (BYTE *)&format;
/* Don't translate FOURCC formats */ - if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return format; + if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return (D3DFORMAT)format;
switch(format) { @@ -108,7 +108,7 @@ enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) BYTE *c = (BYTE *)&format;
/* Don't translate FOURCC formats */ - if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return format; + if (isprint(c[0]) && isprint(c[1]) && isprint(c[2]) && isprint(c[3])) return (enum wined3d_format_id)format;
switch(format) { @@ -244,7 +244,7 @@ void present_parameters_from_wined3d_swapchain_desc(D3DPRESENT_PARAMETERS *prese present_parameters->BackBufferHeight = swapchain_desc->backbuffer_height; present_parameters->BackBufferFormat = d3dformat_from_wined3dformat(swapchain_desc->backbuffer_format); present_parameters->BackBufferCount = swapchain_desc->backbuffer_count; - present_parameters->MultiSampleType = swapchain_desc->multisample_type; + present_parameters->MultiSampleType = (D3DMULTISAMPLE_TYPE)swapchain_desc->multisample_type; present_parameters->MultiSampleQuality = swapchain_desc->multisample_quality; present_parameters->SwapEffect = d3dswapeffect_from_wined3dswapeffect(swapchain_desc->swap_effect); present_parameters->hDeviceWindow = swapchain_desc->device_window; @@ -335,7 +335,7 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch swapchain_desc->backbuffer_format = wined3dformat_from_d3dformat(present_parameters->BackBufferFormat); swapchain_desc->backbuffer_count = max(1, present_parameters->BackBufferCount); swapchain_desc->backbuffer_bind_flags = WINED3D_BIND_RENDER_TARGET; - swapchain_desc->multisample_type = present_parameters->MultiSampleType; + swapchain_desc->multisample_type = (enum wined3d_multisample_type)present_parameters->MultiSampleType; swapchain_desc->multisample_quality = present_parameters->MultiSampleQuality; swapchain_desc->swap_effect = wined3dswapeffect_from_d3dswapeffect(present_parameters->SwapEffect); swapchain_desc->device_window = present_parameters->hDeviceWindow; @@ -1008,7 +1008,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 = (enum wined3d_scanline_ordering)mode->ScanLineOrdering; }
if (!wined3d_swapchain_desc_from_present_parameters(&swapchain_desc, present_parameters, extended)) @@ -1522,7 +1522,8 @@ static HRESULT d3d9_device_create_surface(struct d3d9_device *device, unsigned i
if (user_mem) wined3d_texture_update_desc(texture, width, height, - desc.format, multisample_type, multisample_quality, user_mem, 0); + desc.format, (enum wined3d_multisample_type)multisample_type, multisample_quality, + user_mem, 0);
wined3d_texture_decref(texture);
@@ -1574,8 +1575,9 @@ static HRESULT WINAPI d3d9_device_CreateRenderTarget(IDirect3DDevice9Ex *iface, if (lockable) access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
- return d3d9_device_create_surface(device, 0, wined3dformat_from_d3dformat(format), multisample_type, - multisample_quality, 0, WINED3D_BIND_RENDER_TARGET, access, width, height, NULL, surface); + return d3d9_device_create_surface(device, 0, wined3dformat_from_d3dformat(format), + (enum wined3d_multisample_type)multisample_type, multisample_quality, 0, WINED3D_BIND_RENDER_TARGET, + access, width, height, NULL, surface); }
static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex *iface, UINT width, UINT height, @@ -1606,7 +1608,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex * flags |= WINED3D_TEXTURE_CREATE_DISCARD;
return d3d9_device_create_surface(device, flags, wined3dformat_from_d3dformat(format), - multisample_type, multisample_quality, 0, WINED3D_BIND_DEPTH_STENCIL, + (enum wined3d_multisample_type)multisample_type, multisample_quality, 0, WINED3D_BIND_DEPTH_STENCIL, WINED3D_RESOURCE_ACCESS_GPU, width, height, NULL, surface); }
@@ -1807,7 +1809,7 @@ static HRESULT WINAPI d3d9_device_StretchRect(IDirect3DDevice9Ex *iface, IDirect }
hr = wined3d_texture_blt(dst->wined3d_texture, dst->sub_resource_idx, dst_rect, - src->wined3d_texture, src->sub_resource_idx, src_rect, 0, NULL, filter); + src->wined3d_texture, src->sub_resource_idx, src_rect, 0, NULL, (enum wined3d_texture_filter_type)filter); if (hr == WINEDDERR_INVALIDRECT) hr = D3DERR_INVALIDCALL; if (SUCCEEDED(hr) && dst->texture) @@ -2136,7 +2138,8 @@ static HRESULT WINAPI d3d9_device_SetTransform(IDirect3DDevice9Ex *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - wined3d_stateblock_set_transform(device->update_state, state, (const struct wined3d_matrix *)matrix); + wined3d_stateblock_set_transform(device->update_state, (enum wined3d_transform_state)state, + (const struct wined3d_matrix *)matrix); wined3d_mutex_unlock();
return D3D_OK; @@ -2166,7 +2169,7 @@ static HRESULT WINAPI d3d9_device_MultiplyTransform(IDirect3DDevice9Ex *iface,
/* Note: D3DMATRIX is compatible with struct wined3d_matrix. */ wined3d_mutex_lock(); - wined3d_stateblock_multiply_transform(device->state, state, (const struct wined3d_matrix *)matrix); + wined3d_stateblock_multiply_transform(device->state, (enum wined3d_transform_state)state, (const struct wined3d_matrix *)matrix); wined3d_mutex_unlock();
return D3D_OK; @@ -2369,7 +2372,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevi TRACE("iface %p, state %#x, value %#x.\n", iface, state, value);
wined3d_mutex_lock(); - wined3d_stateblock_set_render_state(device->update_state, state, value); + wined3d_stateblock_set_render_state(device->update_state, (enum wined3d_render_state)state, value); if (state == D3DRS_POINTSIZE && value == D3D9_RESZ_CODE) resolve_depth_buffer(device); wined3d_mutex_unlock(); @@ -2715,7 +2718,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetSamplerState(IDirect3DDev sampler -= D3DVERTEXTEXTURESAMPLER0 - WINED3D_VERTEX_SAMPLER_OFFSET;
wined3d_mutex_lock(); - wined3d_stateblock_set_sampler_state(device->update_state, sampler, state, value); + wined3d_stateblock_set_sampler_state(device->update_state, sampler, (enum wined3d_sampler_state)state, value); wined3d_mutex_unlock();
return D3D_OK; @@ -2965,7 +2968,7 @@ static HRESULT WINAPI d3d9_device_DrawPrimitive(IDirect3DDevice9Ex *iface, vertex_count = vertex_count_from_primitive_count(primitive_type, primitive_count); d3d9_device_upload_sysmem_vertex_buffers(device, 0, start_vertex, vertex_count); d3d9_generate_auto_mipmaps(device); - wined3d_device_set_primitive_type(device->wined3d_device, primitive_type, 0); + wined3d_device_set_primitive_type(device->wined3d_device, (enum wined3d_primitive_type)primitive_type, 0); hr = wined3d_device_draw_primitive(device->wined3d_device, start_vertex, vertex_count); if (SUCCEEDED(hr)) d3d9_rts_flag_auto_gen_mipmap(device); @@ -2999,7 +3002,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitive(IDirect3DDevice9Ex *iface d3d9_device_upload_sysmem_index_buffer(device, start_idx, index_count); d3d9_generate_auto_mipmaps(device); wined3d_stateblock_set_base_vertex_index(device->state, base_vertex_idx); - wined3d_device_set_primitive_type(device->wined3d_device, primitive_type, 0); + wined3d_device_set_primitive_type(device->wined3d_device, (enum wined3d_primitive_type)primitive_type, 0); wined3d_device_apply_stateblock(device->wined3d_device, device->state); hr = wined3d_device_draw_indexed_primitive(device->wined3d_device, start_idx, index_count); if (SUCCEEDED(hr)) @@ -3108,7 +3111,7 @@ static HRESULT WINAPI d3d9_device_DrawPrimitiveUP(IDirect3DDevice9Ex *iface, goto done;
d3d9_generate_auto_mipmaps(device); - wined3d_device_set_primitive_type(device->wined3d_device, primitive_type, 0); + wined3d_device_set_primitive_type(device->wined3d_device, (enum wined3d_primitive_type)primitive_type, 0); wined3d_device_apply_stateblock(device->wined3d_device, device->state); hr = wined3d_device_draw_primitive(device->wined3d_device, vb_pos / stride, vtx_count); wined3d_stateblock_set_stream_source(device->state, 0, NULL, 0, 0); @@ -3252,7 +3255,7 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa wined3d_stateblock_set_base_vertex_index(device->state, vb_pos / vertex_stride - min_vertex_idx);
wined3d_device_apply_stateblock(device->wined3d_device, device->state); - wined3d_device_set_primitive_type(device->wined3d_device, primitive_type, 0); + wined3d_device_set_primitive_type(device->wined3d_device, (enum wined3d_primitive_type)primitive_type, 0); hr = wined3d_device_draw_indexed_primitive(device->wined3d_device, ib_pos / idx_fmt_size, idx_count);
wined3d_stateblock_set_stream_source(device->state, 0, NULL, 0, 0); @@ -4254,7 +4257,7 @@ static HRESULT WINAPI d3d9_device_CreateRenderTargetEx(IDirect3DDevice9Ex *iface access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
return d3d9_device_create_surface(device, 0, wined3dformat_from_d3dformat(format), - multisample_type, multisample_quality, usage & WINED3DUSAGE_MASK, + (enum wined3d_multisample_type)multisample_type, multisample_quality, usage & WINED3DUSAGE_MASK, WINED3D_BIND_RENDER_TARGET, access, width, height, NULL, surface); }
@@ -4294,8 +4297,8 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex
*surface = NULL; return d3d9_device_create_surface(device, flags, wined3dformat_from_d3dformat(format), - multisample_type, multisample_quality, usage & WINED3DUSAGE_MASK, WINED3D_BIND_DEPTH_STENCIL, - WINED3D_RESOURCE_ACCESS_GPU, width, height, NULL, surface); + (enum wined3d_multisample_type)multisample_type, multisample_quality, usage & WINED3DUSAGE_MASK, + WINED3D_BIND_DEPTH_STENCIL, WINED3D_RESOURCE_ACCESS_GPU, width, height, NULL, surface); }
static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_ResetEx(IDirect3DDevice9Ex *iface, @@ -4347,7 +4350,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)wined3d_mode.scanline_ordering; }
return hr; @@ -4658,7 +4661,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
wined3d_mutex_lock(); wined3d_adapter = wined3d_output_get_adapter(parent->wined3d_outputs[output_idx]); - if (FAILED(hr = wined3d_device_create(wined3d, wined3d_adapter, device_type, + if (FAILED(hr = wined3d_device_create(wined3d, wined3d_adapter, (enum wined3d_device_type)device_type, focus_window, flags, 4, feature_levels, ARRAY_SIZE(feature_levels), &device->device_parent, &device->wined3d_device))) { @@ -4667,7 +4670,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine return hr; }
- wined3d_get_device_caps(wined3d_adapter, device_type, &wined3d_caps); + wined3d_get_device_caps(wined3d_adapter, (enum wined3d_device_type)device_type, &wined3d_caps); d3d9_caps_from_wined3dcaps(parent, adapter, &caps, &wined3d_caps); device->max_user_clip_planes = caps.MaxUserClipPlanes; device->vs_uniform_count = caps.MaxVertexShaderConst; diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index 070387dde3e..0d68d792ea7 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -258,7 +258,7 @@ static HRESULT WINAPI d3d9_CheckDeviceType(IDirect3D9Ex *iface, UINT adapter, D3 return WINED3DERR_NOTAVAILABLE;
wined3d_mutex_lock(); - hr = wined3d_check_device_type(d3d9->wined3d, d3d9->wined3d_outputs[output_idx], device_type, + hr = wined3d_check_device_type(d3d9->wined3d, d3d9->wined3d_outputs[output_idx], (enum wined3d_device_type)device_type, wined3dformat_from_d3dformat(display_format), wined3dformat_from_d3dformat(backbuffer_format), windowed); wined3d_mutex_unlock(); @@ -324,13 +324,13 @@ static HRESULT WINAPI d3d9_CheckDeviceFormat(IDirect3D9Ex *iface, UINT adapter, { DWORD levels;
- hr = wined3d_check_device_multisample_type(wined3d_adapter, device_type, + hr = wined3d_check_device_multisample_type(wined3d_adapter, (enum wined3d_device_type)device_type, WINED3DFMT_D24_UNORM_S8_UINT, FALSE, WINED3D_MULTISAMPLE_NON_MASKABLE, &levels); if (SUCCEEDED(hr) && !levels) hr = D3DERR_NOTAVAILABLE; } else - hr = wined3d_check_device_format(d3d9->wined3d, wined3d_adapter, device_type, + hr = wined3d_check_device_format(d3d9->wined3d, wined3d_adapter, (enum wined3d_device_type)device_type, wined3dformat_from_d3dformat(adapter_format), usage, bind_flags, wined3d_rtype, wined3dformat_from_d3dformat(format)); wined3d_mutex_unlock(); @@ -358,8 +358,9 @@ static HRESULT WINAPI d3d9_CheckDeviceMultiSampleType(IDirect3D9Ex *iface, UINT
wined3d_mutex_lock(); wined3d_adapter = wined3d_output_get_adapter(d3d9->wined3d_outputs[output_idx]); - hr = wined3d_check_device_multisample_type(wined3d_adapter, device_type, - wined3dformat_from_d3dformat(format), windowed, multisample_type, levels); + hr = wined3d_check_device_multisample_type(wined3d_adapter, (enum wined3d_device_type)device_type, + wined3dformat_from_d3dformat(format), windowed, (enum wined3d_multisample_type)multisample_type, + levels); wined3d_mutex_unlock(); if (hr == WINED3DERR_NOTAVAILABLE && levels) *levels = 1; @@ -384,7 +385,7 @@ static HRESULT WINAPI d3d9_CheckDepthStencilMatch(IDirect3D9Ex *iface, UINT adap
wined3d_mutex_lock(); wined3d_adapter = wined3d_output_get_adapter(d3d9->wined3d_outputs[output_idx]); - hr = wined3d_check_depth_stencil_match(wined3d_adapter, device_type, + hr = wined3d_check_depth_stencil_match(wined3d_adapter, (enum wined3d_device_type)device_type, wined3dformat_from_d3dformat(adapter_format), wined3dformat_from_d3dformat(rt_format), wined3dformat_from_d3dformat(ds_format)); wined3d_mutex_unlock(); @@ -408,7 +409,7 @@ static HRESULT WINAPI d3d9_CheckDeviceFormatConversion(IDirect3D9Ex *iface, UINT
wined3d_mutex_lock(); hr = wined3d_check_device_format_conversion(d3d9->wined3d_outputs[output_idx], - device_type, wined3dformat_from_d3dformat(src_format), + (enum wined3d_device_type)device_type, wined3dformat_from_d3dformat(src_format), wined3dformat_from_d3dformat(dst_format)); wined3d_mutex_unlock();
@@ -436,7 +437,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD
wined3d_mutex_lock(); wined3d_adapter = wined3d_output_get_adapter(d3d9->wined3d_outputs[output_idx]); - hr = wined3d_get_device_caps(wined3d_adapter, device_type, &wined3d_caps); + hr = wined3d_get_device_caps(wined3d_adapter, (enum wined3d_device_type)device_type, &wined3d_caps); wined3d_mutex_unlock();
d3d9_caps_from_wined3dcaps(d3d9, adapter, caps, &wined3d_caps); @@ -515,7 +516,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), (enum wined3d_scanline_ordering)filter->ScanLineOrdering); wined3d_mutex_unlock();
return count; @@ -541,8 +542,8 @@ static HRESULT WINAPI d3d9_EnumAdapterModesEx(IDirect3D9Ex *iface,
wined3d_mutex_lock(); hr = wined3d_output_get_mode(d3d9->wined3d_outputs[output_idx], - wined3dformat_from_d3dformat(filter->Format), filter->ScanLineOrdering, mode_idx, - &wined3d_mode); + wined3dformat_from_d3dformat(filter->Format), (enum wined3d_scanline_ordering)filter->ScanLineOrdering, + mode_idx, &wined3d_mode); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) @@ -551,7 +552,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)wined3d_mode.scanline_ordering; }
return hr; @@ -586,7 +587,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)wined3d_mode.scanline_ordering; }
return hr; diff --git a/dlls/d3d9/query.c b/dlls/d3d9/query.c index e9180fb481f..e4f2e57681d 100644 --- a/dlls/d3d9/query.c +++ b/dlls/d3d9/query.c @@ -98,7 +98,7 @@ static D3DQUERYTYPE WINAPI d3d9_query_GetType(IDirect3DQuery9 *iface) TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); - type = wined3d_query_get_type(query->wined3d_query); + type = (D3DQUERYTYPE)wined3d_query_get_type(query->wined3d_query); wined3d_mutex_unlock();
return type; @@ -198,7 +198,7 @@ HRESULT query_init(struct d3d9_query *query, struct d3d9_device *device, D3DQUER query->refcount = 1;
wined3d_mutex_lock(); - if (FAILED(hr = wined3d_query_create(device->wined3d_device, type, + if (FAILED(hr = wined3d_query_create(device->wined3d_device, (enum wined3d_query_type)type, query, &d3d9_null_wined3d_parent_ops, &query->wined3d_query))) { wined3d_mutex_unlock(); diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index b74f6cacf7e..eacd58644cc 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -224,7 +224,7 @@ static HRESULT WINAPI d3d9_surface_GetDesc(IDirect3DSurface9 *iface, D3DSURFACE_ desc->Type = D3DRTYPE_SURFACE; desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage, wined3d_desc.bind_flags); desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); - desc->MultiSampleType = wined3d_desc.multisample_type; + desc->MultiSampleType = (D3DMULTISAMPLE_TYPE)wined3d_desc.multisample_type; desc->MultiSampleQuality = wined3d_desc.multisample_quality; desc->Width = wined3d_desc.width; desc->Height = wined3d_desc.height; diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index be9c55ac3ef..427d7ead7ad 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)wined3d_mode.scanline_ordering; }
return hr; diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 9be9d450ba0..3c83ed27751 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -367,7 +367,7 @@ static HRESULT WINAPI d3d9_texture_2d_GetLevelDesc(IDirect3DTexture9 *iface, UIN desc->Type = D3DRTYPE_SURFACE; desc->Usage = texture->usage; desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); - desc->MultiSampleType = wined3d_desc.multisample_type; + desc->MultiSampleType = (D3DMULTISAMPLE_TYPE)wined3d_desc.multisample_type; desc->MultiSampleQuality = wined3d_desc.multisample_quality; desc->Width = wined3d_desc.width; desc->Height = wined3d_desc.height; @@ -774,7 +774,7 @@ static HRESULT WINAPI d3d9_texture_cube_GetLevelDesc(IDirect3DCubeTexture9 *ifac desc->Type = D3DRTYPE_SURFACE; desc->Usage = texture->usage; desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage); - desc->MultiSampleType = wined3d_desc.multisample_type; + desc->MultiSampleType = (D3DMULTISAMPLE_TYPE)wined3d_desc.multisample_type; desc->MultiSampleQuality = wined3d_desc.multisample_quality; desc->Width = wined3d_desc.width; desc->Height = wined3d_desc.height;