mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 01:13:38 +00:00
d3dx9/effect: Reset output handle for next after last technique in FindNextValidTechnique().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
671eabdf4f
commit
60a3e01062
|
@ -3816,7 +3816,7 @@ static HRESULT WINAPI d3dx_effect_FindNextValidTechnique(ID3DXEffect *iface, D3D
|
|||
}
|
||||
}
|
||||
|
||||
*next_technique = get_technique_handle(&effect->techniques[0]);
|
||||
*next_technique = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -7892,9 +7892,9 @@ static void test_effect_find_next_valid_technique(void)
|
|||
D3DPRESENT_PARAMETERS present_parameters = {0};
|
||||
IDirect3DDevice9 *device;
|
||||
D3DXTECHNIQUE_DESC desc;
|
||||
D3DXHANDLE tech, tech2;
|
||||
ID3DXEffect *effect;
|
||||
IDirect3D9 *d3d;
|
||||
D3DXHANDLE tech;
|
||||
ULONG refcount;
|
||||
HWND window;
|
||||
HRESULT hr;
|
||||
|
@ -7939,9 +7939,12 @@ static void test_effect_find_next_valid_technique(void)
|
|||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
ok(!strcmp(desc.Name, "tech1"), "Got unexpected technique %s.\n", desc.Name);
|
||||
|
||||
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech);
|
||||
tech2 = tech;
|
||||
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech2);
|
||||
ok(hr == S_FALSE, "Got result %#x.\n", hr);
|
||||
hr = effect->lpVtbl->GetTechniqueDesc(effect, tech, &desc);
|
||||
ok(!tech2, "Unexpected technique handle %p.\n", tech2);
|
||||
/* Test GetTechniqueDesc() with a NULL handle. */
|
||||
hr = effect->lpVtbl->GetTechniqueDesc(effect, tech2, &desc);
|
||||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
ok(!strcmp(desc.Name, "tech0"), "Got unexpected technique %s.\n", desc.Name);
|
||||
|
||||
|
@ -7957,9 +7960,10 @@ static void test_effect_find_next_valid_technique(void)
|
|||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
ok(!strcmp(desc.Name, "tech1"), "Got unexpected technique %s.\n", desc.Name);
|
||||
|
||||
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech);
|
||||
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech2);
|
||||
ok(hr == S_FALSE, "Got result %#x.\n", hr);
|
||||
hr = effect->lpVtbl->GetTechniqueDesc(effect, tech, &desc);
|
||||
ok(!tech2, "Unexpected technique handle %p.\n", tech2);
|
||||
hr = effect->lpVtbl->GetTechniqueDesc(effect, tech2, &desc);
|
||||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
ok(!strcmp(desc.Name, "tech0"), "Got unexpected technique %s.\n", desc.Name);
|
||||
|
||||
|
@ -7985,8 +7989,9 @@ static void test_effect_find_next_valid_technique(void)
|
|||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
ok(!strcmp(desc.Name, "tech1"), "Got unexpected technique %s.\n", desc.Name);
|
||||
|
||||
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech);
|
||||
hr = effect->lpVtbl->FindNextValidTechnique(effect, tech, &tech2);
|
||||
ok(hr == S_FALSE, "Got result %#x.\n", hr);
|
||||
ok(!tech2, "Unexpected technique handle %p.\n", tech2);
|
||||
|
||||
hr = effect->lpVtbl->FindNextValidTechnique(effect, "nope", &tech);
|
||||
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
|
||||
|
|
Loading…
Reference in a new issue