winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2014
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
530 discussions
Start a n
N
ew thread
Henri Verbeet : d3d9/tests: Use a separate device for shadow_test().
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: 7071bf199f097b0fd0176f7e5a5f363a88fb9cff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7071bf199f097b0fd0176f7e5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 17 08:47:29 2014 +0100 d3d9/tests: Use a separate device for shadow_test(). --- dlls/d3d9/tests/visual.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index cbf1928..13d363b 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12410,7 +12410,7 @@ static void intz_test(IDirect3DDevice9 *device) IDirect3DSurface9_Release(rt); } -static void shadow_test(IDirect3DDevice9 *device) +static void shadow_test(void) { static const DWORD ps_code[] = { @@ -12474,21 +12474,33 @@ static void shadow_test(IDirect3DDevice9 *device) IDirect3DSurface9 *original_ds, *original_rt, *rt; IDirect3DPixelShader9 *ps; - IDirect3D9 *d3d9; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; D3DCAPS9 caps; + HWND window; HRESULT hr; UINT i; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); ok(SUCCEEDED(hr), "GetDeviceCaps failed, hr %#x.\n", hr); if (caps.PixelShaderVersion < D3DPS_VERSION(2, 0)) { skip("No pixel shader 2.0 support, skipping shadow test.\n"); - return; + IDirect3DDevice9_Release(device); + goto done; } - hr = IDirect3DDevice9_GetDirect3D(device, &d3d9); - ok(SUCCEEDED(hr), "GetDirect3D failed, hr %#x.\n", hr); hr = IDirect3DDevice9_GetRenderTarget(device, 0, &original_rt); ok(SUCCEEDED(hr), "GetRenderTarget failed, hr %#x.\n", hr); hr = IDirect3DDevice9_GetDepthStencilSurface(device, &original_ds); @@ -12529,9 +12541,9 @@ static void shadow_test(IDirect3DDevice9 *device) IDirect3DSurface9 *ds; unsigned int j; - hr = IDirect3D9_CheckDeviceFormat(d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, - D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, format); - if (FAILED(hr)) continue; + if (FAILED(IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, format))) + continue; hr = IDirect3DDevice9_CreateTexture(device, 1024, 1024, 1, D3DUSAGE_DEPTHSTENCIL, format, D3DPOOL_DEFAULT, &texture, NULL); @@ -12598,18 +12610,15 @@ static void shadow_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr); } - hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(SUCCEEDED(hr), "SetPixelShader failed, hr %#x.\n", hr); IDirect3DPixelShader9_Release(ps); - - hr = IDirect3DDevice9_SetDepthStencilSurface(device, original_ds); - ok(SUCCEEDED(hr), "SetDepthStencilSurface failed, hr %#x.\n", hr); IDirect3DSurface9_Release(original_ds); - IDirect3DSurface9_Release(original_rt); IDirect3DSurface9_Release(rt); - - IDirect3D9_Release(d3d9); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void clip_planes(IDirect3DDevice9 *device, const char *test_name) @@ -15623,11 +15632,11 @@ START_TEST(visual) depth_buffer2_test(device_ptr); depth_blit_test(device_ptr); intz_test(device_ptr); - shadow_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + shadow_test(); fp_special_test(); depth_bounds_test(); srgbwrite_format_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for fp_special_test().
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: b1fbee3340d37da068ca10606c8838c03d642071 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1fbee3340d37da068ca10606…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 17 08:47:28 2014 +0100 d3d9/tests: Use a separate device for fp_special_test(). --- dlls/d3d9/tests/visual.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 4387e55..cbf1928 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12745,7 +12745,7 @@ static void clip_planes_test(IDirect3DDevice9 *device) IDirect3DTexture9_Release(offscreen); } -static void fp_special_test(IDirect3DDevice9 *device) +static void fp_special_test(void) { /* Microsoft's assembler generates nan and inf with "1.#QNAN" and "1.#INF." respectively */ static const DWORD vs_header[] = @@ -12870,18 +12870,33 @@ static void fp_special_test(IDirect3DDevice9 *device) }; IDirect3DPixelShader9 *ps; + IDirect3DDevice9 *device; UINT body_size = 0; + IDirect3D9 *d3d; DWORD *vs_code; + ULONG refcount; D3DCAPS9 caps; + HWND window; HRESULT hr; UINT i; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); ok(SUCCEEDED(hr), "GetDeviceCaps failed, hr %#x.\n", hr); if (caps.PixelShaderVersion < D3DPS_VERSION(2, 0) || caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) { skip("No shader model 2.0 support, skipping floating point specials test.\n"); - return; + IDirect3DDevice9_Release(device); + goto done; } hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1 | D3DFVF_TEXCOORDSIZE1(0)); @@ -12949,6 +12964,11 @@ static void fp_special_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_SetPixelShader(device, NULL); ok(SUCCEEDED(hr), "SetPixelShader failed, hr %#x.\n", hr); IDirect3DPixelShader9_Release(ps); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void srgbwrite_format_test(void) @@ -15604,11 +15624,11 @@ START_TEST(visual) depth_blit_test(device_ptr); intz_test(device_ptr); shadow_test(device_ptr); - fp_special_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + fp_special_test(); depth_bounds_test(); srgbwrite_format_test(); update_surface_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for depth_bounds_test().
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: f281ca2214d57c2b6b48da09d3cfffda6eb8beba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f281ca2214d57c2b6b48da09d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 17 08:47:27 2014 +0100 d3d9/tests: Use a separate device for depth_bounds_test(). --- dlls/d3d9/tests/visual.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index ff23acf..4387e55 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -11605,7 +11605,7 @@ static void depth_clamp_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); } -static void depth_bounds_test(IDirect3DDevice9 *device) +static void depth_bounds_test(void) { const struct tvertex quad1[] = { @@ -11634,19 +11634,29 @@ static void depth_bounds_test(IDirect3DDevice9 *device) float f; } tmpvalue; - IDirect3D9 *d3d = NULL; IDirect3DSurface9 *offscreen_surface = NULL; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; D3DCOLOR color; + ULONG refcount; + HWND window; HRESULT hr; - IDirect3DDevice9_GetDirect3D(device, &d3d); - if(IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, - 0, D3DRTYPE_SURFACE, MAKEFOURCC('N','V','D','B')) != D3D_OK) { - skip("No NVDB (depth bounds test) support\n"); - IDirect3D9_Release(d3d); - return; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, 0, D3DRTYPE_SURFACE, MAKEFOURCC('N','V','D','B')) != D3D_OK) + { + skip("No NVDB (depth bounds test) support, skipping tests.\n"); + goto done; + } + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; } - IDirect3D9_Release(d3d); hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32, MAKEFOURCC('N','V','D','B'), D3DPOOL_DEFAULT, &offscreen_surface, NULL); @@ -11719,6 +11729,11 @@ static void depth_bounds_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void depth_buffer_test(IDirect3DDevice9 *device) @@ -15590,11 +15605,11 @@ START_TEST(visual) intz_test(device_ptr); shadow_test(device_ptr); fp_special_test(device_ptr); - depth_bounds_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + depth_bounds_test(); srgbwrite_format_test(); update_surface_test(); multisample_get_rtdata_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for srgbwrite_format_test().
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: e93ff4063f291de0be61ce5f895812cb867892e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e93ff4063f291de0be61ce5f8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 17 08:47:26 2014 +0100 d3d9/tests: Use a separate device for srgbwrite_format_test(). --- dlls/d3d9/tests/visual.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index bb42e7a..ff23acf 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12936,11 +12936,14 @@ static void fp_special_test(IDirect3DDevice9 *device) IDirect3DPixelShader9_Release(ps); } -static void srgbwrite_format_test(IDirect3DDevice9 *device) +static void srgbwrite_format_test(void) { IDirect3D9 *d3d; IDirect3DSurface9 *rt, *backbuffer; IDirect3DTexture9 *texture; + IDirect3DDevice9 *device; + ULONG refcount; + HWND window; HRESULT hr; int i; DWORD color_rgb = 0x00808080, color_srgb = 0x00bcbcbc, color; @@ -12970,8 +12973,16 @@ static void srgbwrite_format_test(IDirect3DDevice9 *device) { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f} }; - hr = IDirect3DDevice9_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "GetDirect3D failed, hr %#x.\n", hr); + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); ok(SUCCEEDED(hr), "SetFVF failed, hr %#x.\n", hr); hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); @@ -12991,10 +13002,10 @@ static void srgbwrite_format_test(IDirect3DDevice9 *device) continue; } - hr = IDirect3DDevice9_CreateTexture(device, 8, 8, 1, D3DUSAGE_RENDERTARGET, formats[i].fmt, - D3DPOOL_DEFAULT, &texture, NULL); + hr = IDirect3DDevice9_CreateTexture(device, 8, 8, 1, D3DUSAGE_RENDERTARGET, + formats[i].fmt, D3DPOOL_DEFAULT, &texture, NULL); ok(SUCCEEDED(hr), "CreateTexture failed, hr %#x.\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0f, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00ff0000, 1.0f, 0); ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &rt); @@ -13055,11 +13066,12 @@ static void srgbwrite_format_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr); } - hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(SUCCEEDED(hr), "SetTextureStageState failed, hr %#x.\n", hr); - - IDirect3D9_Release(d3d); IDirect3DSurface9_Release(backbuffer); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void ds_size_test(IDirect3DDevice9 *device) @@ -15579,11 +15591,11 @@ START_TEST(visual) shadow_test(device_ptr); fp_special_test(device_ptr); depth_bounds_test(device_ptr); - srgbwrite_format_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + srgbwrite_format_test(); update_surface_test(); multisample_get_rtdata_test(); zenable_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for update_surface_test( ).
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: cfbb16ad496a16fb0d9330b327cee5abd173a7f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cfbb16ad496a16fb0d9330b32…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Mar 17 08:47:25 2014 +0100 d3d9/tests: Use a separate device for update_surface_test(). --- dlls/d3d9/tests/visual.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 069642b..bb42e7a 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -13309,7 +13309,7 @@ static void unbound_sampler_test(IDirect3DDevice9 *device) IDirect3DPixelShader9_Release(ps_volume); } -static void update_surface_test(IDirect3DDevice9 *device) +static void update_surface_test(void) { static const BYTE blocks[][8] = { @@ -13367,23 +13367,28 @@ static void update_surface_test(IDirect3DDevice9 *device) IDirect3DSurface9 *src_surface, *dst_surface; IDirect3DTexture9 *src_tex, *dst_tex; + IDirect3DDevice9 *device; IDirect3D9 *d3d; + ULONG refcount; UINT count, i; + HWND window; HRESULT hr; - hr = IDirect3DDevice9_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "GetDirect3D failed, hr %#x.\n", hr); - - hr = IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, - D3DFMT_X8R8G8B8, 0, D3DRTYPE_TEXTURE, D3DFMT_DXT1); - IDirect3D9_Release(d3d); - if (FAILED(hr)) + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (FAILED(IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, 0, D3DRTYPE_TEXTURE, D3DFMT_DXT1))) { - skip("DXT1 not supported, skipping test.\n"); - return; + skip("DXT1 not supported, skipping tests.\n"); + goto done; + } + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; } - - IDirect3D9_Release(d3d); hr = IDirect3DDevice9_CreateTexture(device, 64, 64, 0, 0, D3DFMT_DXT1, D3DPOOL_SYSTEMMEM, &src_tex, NULL); ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); @@ -13488,12 +13493,13 @@ static void update_surface_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(SUCCEEDED(hr), "SetTexture failed, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(SUCCEEDED(hr), "SetTextureStageState failed, hr %#x.\n", hr); IDirect3DTexture9_Release(dst_tex); IDirect3DTexture9_Release(src_tex); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void multisample_get_rtdata_test(void) @@ -15574,11 +15580,11 @@ START_TEST(visual) fp_special_test(device_ptr); depth_bounds_test(device_ptr); srgbwrite_format_test(device_ptr); - update_surface_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + update_surface_test(); multisample_get_rtdata_test(); zenable_test(); fog_special_test();
1
0
0
0
Nikolay Sivov : winedump: Output parameters and default values type for methods.
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: 39a347945da91ec16848c31aaf4276f06e763c17 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39a347945da91ec16848c31aa…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 16 18:35:17 2014 +0400 winedump: Output parameters and default values type for methods. --- tools/winedump/tlb.c | 190 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 184 insertions(+), 6 deletions(-) diff --git a/tools/winedump/tlb.c b/tools/winedump/tlb.c index bcaa859..26da2a4 100644 --- a/tools/winedump/tlb.c +++ b/tools/winedump/tlb.c @@ -44,6 +44,61 @@ enum TYPEKIND { TKIND_MAX }; +enum VARENUM { + VT_EMPTY = 0, + VT_NULL = 1, + VT_I2 = 2, + VT_I4 = 3, + VT_R4 = 4, + VT_R8 = 5, + VT_CY = 6, + VT_DATE = 7, + VT_BSTR = 8, + VT_DISPATCH = 9, + VT_ERROR = 10, + VT_BOOL = 11, + VT_VARIANT = 12, + VT_UNKNOWN = 13, + VT_DECIMAL = 14, + VT_I1 = 16, + VT_UI1 = 17, + VT_UI2 = 18, + VT_UI4 = 19, + VT_I8 = 20, + VT_UI8 = 21, + VT_INT = 22, + VT_UINT = 23, + VT_VOID = 24, + VT_HRESULT = 25, + VT_PTR = 26, + VT_SAFEARRAY = 27, + VT_CARRAY = 28, + VT_USERDEFINED = 29, + VT_LPSTR = 30, + VT_LPWSTR = 31, + VT_RECORD = 36, + VT_INT_PTR = 37, + VT_UINT_PTR = 38, + VT_FILETIME = 64, + VT_BLOB = 65, + VT_STREAM = 66, + VT_STORAGE = 67, + VT_STREAMED_OBJECT = 68, + VT_STORED_OBJECT = 69, + VT_BLOB_OBJECT = 70, + VT_CF = 71, + VT_CLSID = 72, + VT_VERSIONED_STREAM = 73, + VT_BSTR_BLOB = 0xfff, + VT_VECTOR = 0x1000, + VT_ARRAY = 0x2000, + VT_BYREF = 0x4000, + VT_RESERVED = 0x8000, + VT_ILLEGAL = 0xffff, + VT_ILLEGALMASKED = 0xfff, + VT_TYPEMASK = 0xfff +}; + struct seg_t; typedef BOOL (*dump_seg_t)(struct seg_t*); @@ -54,6 +109,25 @@ typedef struct seg_t { int offset; int length; } seg_t; +static seg_t segdir[]; + +enum SEGDIRTYPE { + SEGDIR_TYPEINFO, + SEGDIR_IMPINFO, + SEGDIR_IMPFILES, + SEGDIR_REF, + SEGDIR_GUIDHASH, + SEGDIR_GUID, + SEGDIR_NAMEHASH, + SEGDIR_NAME, + SEGDIR_STRING, + SEGDIR_TYPEDESC, + SEGDIR_ARRAYDESC, + SEGDIR_CUSTDATA, + SEGDIR_CDGUID, + SEGDIR_res0e, + SEGDIR_res0f +}; static int offset=0; static int indent; @@ -172,6 +246,25 @@ static void print_guid(const char *name) guid.Data4[5], guid.Data4[6], guid.Data4[7]); } +static void print_vartype(int vartype) +{ + static const char *vartypes[VT_LPWSTR+1] = { + "VT_EMPTY", "VT_NULL", "VT_I2", "VT_I4", "VT_R4", + "VT_R8", "VT_CY", "VT_DATE", "VT_BSTR", "VT_DISPATCH", + "VT_ERROR", "VT_BOOL", "VT_VARIANT", "VT_UNKNOWN","VT_DECIMAL", + "unk 15", "VT_I1", "VT_UI1", "VT_UI2", "VT_UI4", + "VT_I8", "VT_UI8", "VT_INT", "VT_UINT", "VT_VOID", + "VT_HRESULT", "VT_PTR", "VT_SAFEARRAY","VT_CARRAY", "VT_USERDEFINED", + "VT_LPSTR", "VT_LPWSTR" + }; + + vartype &= VT_TYPEMASK; + if (vartype >= VT_EMPTY && vartype <= VT_LPWSTR) + printf("%s\n", vartypes[vartype]); + else + printf("unk %d\n", vartype); +} + static void print_ctl2(const char *name) { int len; @@ -266,11 +359,27 @@ static void dump_msft_header(void) print_end_block(); } +static int dump_msft_typekind(void) +{ + static const char *tkind[TKIND_MAX] = { + "TKIND_ENUM", "TKIND_RECORD", "TKIND_MODULE", + "TKIND_INTERFACE", "TKIND_DISPATCH", "TKIND_COCLASS", + "TKIND_ALIAS", "TKIND_UNION" + }; + int ret, typekind; + + print_offset(); + ret = tlb_read_int(); + typekind = ret & 0xf; + printf("typekind = %s, align = %d\n", typekind < TKIND_MAX ? tkind[typekind] : "unknown", (ret >> 11) & 0x1f); + return ret; +} + static void dump_msft_typeinfobase(void) { print_begin_block_id("TypeInfoBase", msft_typeinfo_cnt); - msft_typeinfo_kind[msft_typeinfo_cnt] = print_hex("typekind"); + msft_typeinfo_kind[msft_typeinfo_cnt] = dump_msft_typekind(); msft_typeinfo_offs[msft_typeinfo_cnt] = print_hex("memoffset"); print_hex("res2"); print_hex("res3"); @@ -531,7 +640,7 @@ static BOOL dump_msft_custdata(seg_t *seg) n = tlb_read_int(); switch(vt) { - case 8 /* VT_BSTR */: + case VT_BSTR: printf(" len %d: ", n); dump_string(n, 2); printf("\n"); @@ -586,6 +695,75 @@ static BOOL dump_msft_res0f(seg_t *seg) return TRUE; } +/* Used for function return value and arguments type */ +static void dump_msft_datatype(const char *name) +{ + int datatype; + + print_offset(); + datatype = tlb_read_int(); + printf("%s = %08x", name, datatype); + if (datatype < 0) { + printf(", "); + print_vartype(datatype); + } + else { + const short *vt; + + if (datatype > segdir[SEGDIR_TYPEDESC].length) { + printf(", invalid offset\n"); + return; + } + + /* FIXME: in case of VT_USERDEFINED use hreftype */ + vt = PRD(segdir[SEGDIR_TYPEDESC].offset + datatype, 4*sizeof(short)); + datatype = vt[0] & VT_TYPEMASK; + if (datatype == VT_PTR) { + printf(", VT_PTR -> "); + if (vt[3] < 0) + datatype = vt[2]; + else { + vt = PRD(segdir[SEGDIR_TYPEDESC].offset + vt[2], 4*sizeof(short)); + datatype = *vt; + } + } + else { + printf(", "); + datatype = *vt; + } + + print_vartype(datatype); + } +} + +static void dump_defaultvalue(int id) +{ + int offset; + + print_offset(); + offset = tlb_read_int(); + + printf("default value[%d] = %08x", id, offset); + if (offset == -1) + printf("\n"); + else if (offset < 0) { + printf(", "); + print_vartype((offset & 0x7c000000) >> 26); + } + else { + const unsigned short *vt; + + if (offset > segdir[SEGDIR_CUSTDATA].length) { + printf(", invalid offset\n"); + return; + } + + vt = PRD(segdir[SEGDIR_CUSTDATA].offset + offset, sizeof(*vt)); + printf(", "); + print_vartype(*vt); + } +} + static void dump_msft_func(int n) { int size, args_cnt, i, extra_attr, fkccic; @@ -594,7 +772,7 @@ static void dump_msft_func(int n) size = print_short_hex("size"); print_short_hex("index"); - print_hex("DataType"); + dump_msft_datatype("retval type"); print_hex("flags"); print_short_hex("VtableOffset"); print_short_hex("funcdescsize"); @@ -623,16 +801,16 @@ static void dump_msft_func(int n) if(fkccic & 0x1000) { for(i=0; i < args_cnt; i++) - print_hex_id("default value[%d]", i); + dump_defaultvalue(i); } for(i=0; i < args_cnt; i++) { print_begin_block_id("param", i); /* FIXME: Handle default values */ - print_hex("data[0]"); + dump_msft_datatype("datatype"); + print_hex("name"); print_hex("paramflags"); - print_hex("data[2]"); print_end_block(); }
1
0
0
0
Nikolay Sivov : winedump: Improve typelib header dumping.
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: 74f39d20d55ec6c163ea0517eba62bc0c1ea0c43 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74f39d20d55ec6c163ea0517e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 16 18:35:04 2014 +0400 winedump: Improve typelib header dumping. --- tools/winedump/tlb.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/tools/winedump/tlb.c b/tools/winedump/tlb.c index 9c3067b..bcaa859 100644 --- a/tools/winedump/tlb.c +++ b/tools/winedump/tlb.c @@ -214,6 +214,29 @@ static void dump_binary(int n) printf("\n"); } +static int dump_msft_varflags(void) +{ + static const char *syskind[] = { + "SYS_WIN16", "SYS_WIN32", "SYS_MAC", "SYS_WIN64", "unknown" + }; + int kind, flags; + + print_offset(); + flags = tlb_read_int(); + kind = flags & 0xf; + if (kind > 3) kind = 4; + printf("varflags = %08x, syskind = %s\n", flags, syskind[kind]); + return flags; +} + +static void dump_msft_version(void) +{ + int version; + print_offset(); + version = tlb_read_int(); + printf("version = %d.%d\n", version & 0xff, version >> 16); +} + static void dump_msft_header(void) { print_begin_block("Header"); @@ -222,15 +245,15 @@ static void dump_msft_header(void) print_hex("magic2"); print_hex("posguid"); print_hex("lcid"); - print_hex("lsid2"); - header_flags = print_hex("varflags"); - print_hex("version"); + print_hex("lcid2"); + header_flags = dump_msft_varflags(); + dump_msft_version(); print_hex("flags"); typeinfo_cnt = print_dec("ntypeinfos"); - print_hex("helpstring"); - print_hex("helpstringcontext"); - print_hex("helpcontext"); - print_dec("nametablecont"); + print_dec("helpstring"); + print_dec("helpstringcontext"); + print_dec("helpcontext"); + print_dec("nametablecount"); print_dec("nametablechars"); print_hex("NameOffset"); print_hex("helpfile");
1
0
0
0
Nikolay Sivov : scrrun: Implement CreateTextFile().
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: 63db2d2e922b2b796f4d37202579a4f1220e236b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=63db2d2e922b2b796f4d37202…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 16 16:06:28 2014 +0400 scrrun: Implement CreateTextFile(). --- dlls/scrrun/filesystem.c | 51 ++++++++++++++++++++++----- dlls/scrrun/tests/filesystem.c | 74 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 8 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index d87ba30..1d47d73 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -109,6 +109,7 @@ struct textstream { LONG ref; IOMode mode; + HANDLE file; }; enum iotype { @@ -245,7 +246,10 @@ static ULONG WINAPI textstream_Release(ITextStream *iface) TRACE("(%p)->(%d)\n", This, ref); if (!ref) + { + CloseHandle(This->file); heap_free(This); + } return ref; } @@ -435,9 +439,26 @@ static const ITextStreamVtbl textstreamvtbl = { textstream_Close }; -static HRESULT create_textstream(IOMode mode, ITextStream **ret) +static HRESULT create_textstream(const WCHAR *filename, DWORD disposition, IOMode mode, ITextStream **ret) { struct textstream *stream; + DWORD access = 0; + + /* map access mode */ + switch (mode) + { + case ForReading: + access = GENERIC_READ; + break; + case ForWriting: + access = GENERIC_WRITE; + break; + case ForAppending: + access = FILE_APPEND_DATA; + break; + default: + return E_INVALIDARG; + } stream = heap_alloc(sizeof(struct textstream)); if (!stream) return E_OUTOFMEMORY; @@ -446,6 +467,14 @@ static HRESULT create_textstream(IOMode mode, ITextStream **ret) stream->ref = 1; stream->mode = mode; + stream->file = CreateFileW(filename, access, 0, NULL, disposition, FILE_ATTRIBUTE_NORMAL, NULL); + if (stream->file == INVALID_HANDLE_VALUE) + { + HRESULT hr = create_error(GetLastError()); + heap_free(stream); + return hr; + } + *ret = &stream->ITextStream_iface; return S_OK; } @@ -3257,21 +3286,27 @@ static HRESULT WINAPI filesys_CreateFolder(IFileSystem3 *iface, BSTR path, return create_folder(path, folder); } -static HRESULT WINAPI filesys_CreateTextFile(IFileSystem3 *iface, BSTR FileName, - VARIANT_BOOL Overwrite, VARIANT_BOOL Unicode, - ITextStream **ppts) +static HRESULT WINAPI filesys_CreateTextFile(IFileSystem3 *iface, BSTR filename, + VARIANT_BOOL overwrite, VARIANT_BOOL unicode, + ITextStream **stream) { - FIXME("%p %s %d %d %p\n", iface, debugstr_w(FileName), Overwrite, Unicode, ppts); + DWORD disposition; - return E_NOTIMPL; + TRACE("%p %s %d %d %p\n", iface, debugstr_w(filename), overwrite, unicode, stream); + + disposition = overwrite == VARIANT_TRUE ? CREATE_ALWAYS : CREATE_NEW; + return create_textstream(filename, disposition, ForWriting, stream); } static HRESULT WINAPI filesys_OpenTextFile(IFileSystem3 *iface, BSTR filename, IOMode mode, VARIANT_BOOL create, Tristate format, ITextStream **stream) { - FIXME("(%p)->(%s %d %d %d %p)\n", iface, debugstr_w(filename), mode, create, format, stream); - return create_textstream(mode, stream); + DWORD disposition; + + TRACE("(%p)->(%s %d %d %d %p)\n", iface, debugstr_w(filename), mode, create, format, stream); + disposition = create == VARIANT_TRUE ? OPEN_ALWAYS : OPEN_EXISTING; + return create_textstream(filename, disposition, mode, stream); } static HRESULT WINAPI filesys_GetStandardStream(IFileSystem3 *iface, diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index c62b2bc..3e8d4bb 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -167,6 +167,28 @@ static void test_textstream(void) ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); ok(b == VARIANT_TRUE, "got %x\n", b); + /* different mode combinations */ + hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting | ForAppending, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IFileSystem3_OpenTextFile(fs3, name, ForReading | ForAppending, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting | ForReading, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IFileSystem3_OpenTextFile(fs3, name, ForAppending, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = ITextStream_Read(stream, 1, &data); + ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr); + ITextStream_Release(stream); + + hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = ITextStream_Read(stream, 1, &data); + ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr); + ITextStream_Release(stream); + hr = IFileSystem3_OpenTextFile(fs3, name, ForReading, VARIANT_FALSE, TristateFalse, &stream); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -1192,6 +1214,57 @@ static void test_DriveCollection(void) IDriveCollection_Release(drives); } +static void test_CreateTextFile(void) +{ + static const WCHAR scrrunW[] = {'s','c','r','r','u','n','\\',0}; + static const WCHAR testfileW[] = {'t','e','s','t','.','t','x','t',0}; + WCHAR pathW[MAX_PATH], dirW[MAX_PATH]; + ITextStream *stream; + BSTR nameW, str; + HANDLE file; + HRESULT hr; + BOOL ret; + + GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + lstrcatW(pathW, scrrunW); + lstrcpyW(dirW, pathW); + lstrcatW(pathW, testfileW); + + /* dir doesn't exist */ + nameW = SysAllocString(pathW); + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream); + ok(hr == CTL_E_PATHNOTFOUND, "got 0x%08x\n", hr); + + ret = CreateDirectoryW(dirW, NULL); + ok(ret, "got %d, %d\n", ret, GetLastError()); + + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = ITextStream_Read(stream, 1, &str); + ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr); + + ITextStream_Release(stream); + + /* check it's created */ + file = CreateFileW(pathW, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + ok(file != INVALID_HANDLE_VALUE, "got %p\n", file); + CloseHandle(file); + + /* try to create again with no-overwrite mode */ + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream); + ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr); + + /* now overwrite */ + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + ITextStream_Release(stream); + + DeleteFileW(nameW); + RemoveDirectoryW(dirW); + SysFreeString(nameW); +} + START_TEST(filesystem) { HRESULT hr; @@ -1220,6 +1293,7 @@ START_TEST(filesystem) test_FolderCollection(); test_FileCollection(); test_DriveCollection(); + test_CreateTextFile(); IFileSystem3_Release(fs3);
1
0
0
0
Frédéric Delanoy : comctl32: Use BOOL type where appropriate.
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: 1bf4e13b55fcfdcbaddea6bbcb2588d7e5d612a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1bf4e13b55fcfdcbaddea6bbc…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Sat Mar 15 13:05:35 2014 +0100 comctl32: Use BOOL type where appropriate. --- dlls/comctl32/datetime.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 9f91fd3..5c73a90 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -217,7 +217,7 @@ DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *sy return FALSE; /* Windows returns true if the date is valid but outside the limits set */ - if (DATETIME_IsDateInValidRange(infoPtr, systime) == FALSE) + if (!DATETIME_IsDateInValidRange(infoPtr, systime)) return TRUE; infoPtr->dateValid = TRUE; @@ -846,7 +846,8 @@ static void DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr) { int fieldNum = infoPtr->select & DTHT_DATEFIELD; - int i, val=0, clamp_day=0; + int i, val = 0; + BOOL clamp_day = FALSE; SYSTEMTIME date = infoPtr->date; int oldyear; @@ -870,7 +871,7 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr) date.wYear = date.wYear - (date.wYear%100) + val; if (DATETIME_IsDateInValidRange(infoPtr, &date)) - clamp_day = 1; + clamp_day = TRUE; else date.wYear = oldyear; @@ -881,7 +882,7 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr) date.wYear = val; if (DATETIME_IsDateInValidRange(infoPtr, &date)) - clamp_day = 1; + clamp_day = TRUE; else date.wYear = oldyear; @@ -889,7 +890,7 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr) case ONEDIGITMONTH: case TWODIGITMONTH: date.wMonth = val; - clamp_day = 1; + clamp_day = TRUE; break; case ONEDIGITDAY: case TWODIGITDAY:
1
0
0
0
Zhenbo Li : mshtml: Added IHTMLTableRow::rowIndex property implementation.
by Alexandre Julliard
17 Mar '14
17 Mar '14
Module: wine Branch: master Commit: 0f8ae7bc4545a16cd878447f95cf45e170566259 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f8ae7bc4545a16cd878447f9…
Author: Zhenbo Li <litimetal(a)gmail.com> Date: Sat Mar 15 11:23:10 2014 +0800 mshtml: Added IHTMLTableRow::rowIndex property implementation. --- dlls/mshtml/htmltablerow.c | 11 +++++++++-- dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmltablerow.c b/dlls/mshtml/htmltablerow.c index 832cb6c..b475e7d 100644 --- a/dlls/mshtml/htmltablerow.c +++ b/dlls/mshtml/htmltablerow.c @@ -226,8 +226,15 @@ static HRESULT WINAPI HTMLTableRow_get_borderColorDark(IHTMLTableRow *iface, VAR static HRESULT WINAPI HTMLTableRow_get_rowIndex(IHTMLTableRow *iface, LONG *p) { HTMLTableRow *This = impl_from_IHTMLTableRow(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + nsres = nsIDOMHTMLTableRowElement_GetRowIndex(This->nsrow, p); + if(NS_FAILED(nsres)) { + ERR("Get rowIndex failed: %08x\n", nsres); + return E_FAIL; + } + return S_OK; } static HRESULT WINAPI HTMLTableRow_get_selectionRowIndex(IHTMLTableRow *iface, LONG *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 013a2a9..670f5c7 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5577,6 +5577,7 @@ static void test_tr_elem(IHTMLElement *elem) IHTMLTableRow *row; HRESULT hres; BSTR bstr; + LONG lval; static const elem_type_t cell_types[] = {ET_TD,ET_TD}; @@ -5617,6 +5618,11 @@ static void test_tr_elem(IHTMLElement *elem) ok(!strcmp_wa(bstr, "top"), "get_valign returned %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); + lval = 0xdeadbeef; + hres = IHTMLTableRow_get_rowIndex(row, &lval); + ok(hres == S_OK, "get_rowIndex failed: %08x\n", hres); + ok(lval == 1, "get_rowIndex returned %d\n", lval); + IHTMLTableRow_Release(row); }
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
53
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Results per page:
10
25
50
100
200