Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d9/device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index e7e956dcf3..15400d309c 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2618,20 +2618,20 @@ static const enum wined3d_texture_stage_state tss_lookup[] = };
static HRESULT WINAPI d3d9_device_GetTextureStageState(IDirect3DDevice9Ex *iface, - DWORD stage, D3DTEXTURESTAGESTATETYPE state, DWORD *value) + DWORD sampler_idx, D3DTEXTURESTAGESTATETYPE state, DWORD *value) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
- TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, stage, state, value); + TRACE("iface %p, sampler_idx %u, state %#x, value %p.\n", iface, sampler_idx, state, value);
- if (state >= ARRAY_SIZE(tss_lookup)) + if (state >= ARRAY_SIZE(tss_lookup) || tss_lookup[state] == WINED3D_TSS_INVALID) { WARN("Invalid state %#x passed.\n", state); return D3D_OK; }
wined3d_mutex_lock(); - *value = wined3d_device_get_texture_stage_state(device->wined3d_device, stage, tss_lookup[state]); + *value = wined3d_stateblock_get_state(device->state)->texture_states[sampler_idx][tss_lookup[state]]; wined3d_mutex_unlock();
return D3D_OK;