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
May 2011
----- 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
945 discussions
Start a n
N
ew thread
Stefan Dösinger : port: Add isinf and isnan implementations for Visual Studio.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: a774152f1ad87db57787102620722384dcf9c329 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a774152f1ad87db5778710262…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue May 24 21:05:28 2011 +0200 port: Add isinf and isnan implementations for Visual Studio. --- configure | 2 ++ configure.ac | 2 ++ include/config.h.in | 6 ++++++ libs/port/isinf.c | 8 ++++++++ libs/port/isnan.c | 8 ++++++++ 5 files changed, 26 insertions(+), 0 deletions(-) diff --git a/configure b/configure index efb2b1f..ea832b5 100755 --- a/configure +++ b/configure @@ -12803,6 +12803,8 @@ esac ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $BUILTINFLAG" for ac_func in \ + _finite \ + _isnan \ _pclose \ _popen \ _snprintf \ diff --git a/configure.ac b/configure.ac index ae44609..683bae9 100644 --- a/configure.ac +++ b/configure.ac @@ -1939,6 +1939,8 @@ dnl **** Check for functions **** ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $BUILTINFLAG" AC_CHECK_FUNCS(\ + _finite \ + _isnan \ _pclose \ _popen \ _snprintf \ diff --git a/include/config.h.in b/include/config.h.in index 4bdbc38..04507e0 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1151,6 +1151,12 @@ /* Define to 1 if you have the <zlib.h> header file. */ #undef HAVE_ZLIB_H +/* Define to 1 if you have the `_finite' function. */ +#undef HAVE__FINITE + +/* Define to 1 if you have the `_isnan' function. */ +#undef HAVE__ISNAN + /* Define to 1 if you have the `_pclose' function. */ #undef HAVE__PCLOSE diff --git a/libs/port/isinf.c b/libs/port/isinf.c index e0c35ad..fff24aa 100644 --- a/libs/port/isinf.c +++ b/libs/port/isinf.c @@ -31,6 +31,14 @@ int isinf(double x) return (!(finite(x) || isnand(x))); } +#elif defined(HAVE_FLOAT_H) && defined(HAVE__ISNAN) && defined(HAVE__FINITE) +#include <float.h> + +int isinf(double x) +{ + return (!(_finite(x) || _isnan(x))); +} + #else #error No isinf() implementation available. #endif diff --git a/libs/port/isnan.c b/libs/port/isnan.c index b2a1be6..c48dd41 100644 --- a/libs/port/isnan.c +++ b/libs/port/isnan.c @@ -31,6 +31,14 @@ int isnan(double x) return isnand(x); } +#elif defined(HAVE_FLOAT_H) && defined(HAVE__ISNAN) +#include <float.h> + +int isnan(double x) +{ + return _isnan(x); +} + #else #error No isnan() implementation available. #endif
1
0
0
0
Stefan Dösinger : d3d9: Use a pixel shader for the vs 3.0 input test.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: cf757a6361c87d4be76d8d82763a0d2f0a68643e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf757a6361c87d4be76d8d827…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon May 23 18:40:43 2011 +0200 d3d9: Use a pixel shader for the vs 3.0 input test. --- dlls/d3d9/tests/visual.c | 50 +++++++++++++++++++++++++++++++++++---------- 1 files changed, 39 insertions(+), 11 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index affd416..0f7e2ab 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -5956,7 +5956,8 @@ static void test_compare_instructions(IDirect3DDevice9 *device) static void test_vshader_input(IDirect3DDevice9 *device) { - DWORD swapped_shader_code_3[] = { + static const DWORD swapped_shader_code_3[] = + { 0xfffe0300, /* vs_3_0 */ 0x0200001f, 0x80000000, 0xe00f0000, /* dcl_position o0 */ 0x0200001f, 0x8000000a, 0xe00f0001, /* dcl_color o1 */ @@ -5968,7 +5969,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) 0x03000002, 0xe00f0001, 0x80e40001, 0x91e40002, /* sub o1, r1, v2 */ 0x0000ffff /* end */ }; - DWORD swapped_shader_code_1[] = { + static const DWORD swapped_shader_code_1[] = + { 0xfffe0101, /* vs_1_1 */ 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x0000001f, 0x80000005, 0x900f0001, /* dcl_texcoord0 v1 */ @@ -5978,7 +5980,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) 0x00000002, 0xd00f0000, 0x80e40001, 0x91e40002, /* sub o1, r1, v2 */ 0x0000ffff /* end */ }; - DWORD swapped_shader_code_2[] = { + static const DWORD swapped_shader_code_2[] = + { 0xfffe0200, /* vs_2_0 */ 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x0200001f, 0x80000005, 0x900f0001, /* dcl_texcoord0 v1 */ @@ -5988,7 +5991,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) 0x03000002, 0xd00f0000, 0x80e40001, 0x91e40002, /* sub o1, r1, v2 */ 0x0000ffff /* end */ }; - DWORD texcoord_color_shader_code_3[] = { + static const DWORD texcoord_color_shader_code_3[] = + { 0xfffe0300, /* vs_3_0 */ 0x0200001f, 0x80000000, 0xe00f0000, /* dcl_position o0 */ 0x0200001f, 0x8000000a, 0xe00f0001, /* dcl_color o1 */ @@ -5998,7 +6002,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) 0x02000001, 0xe00f0001, 0x90e40001, /* mov o1, v1 */ 0x0000ffff /* end */ }; - DWORD texcoord_color_shader_code_2[] = { + static const DWORD texcoord_color_shader_code_2[] = + { 0xfffe0200, /* vs_2_0 */ 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x0200001f, 0x80000005, 0x900f0001, /* dcl_texcoord v1 */ @@ -6006,7 +6011,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) 0x02000001, 0xd00f0000, 0x90e40001, /* mov oD0, v1 */ 0x0000ffff /* end */ }; - DWORD texcoord_color_shader_code_1[] = { + static const DWORD texcoord_color_shader_code_1[] = + { 0xfffe0101, /* vs_1_1 */ 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x0000001f, 0x80000005, 0x900f0001, /* dcl_texcoord v1 */ @@ -6014,7 +6020,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) 0x00000001, 0xd00f0000, 0x90e40001, /* mov oD0, v1 */ 0x0000ffff /* end */ }; - DWORD color_color_shader_code_3[] = { + static const DWORD color_color_shader_code_3[] = + { 0xfffe0300, /* vs_3_0 */ 0x0200001f, 0x80000000, 0xe00f0000, /* dcl_position o0 */ 0x0200001f, 0x8000000a, 0xe00f0001, /* dcl_color o1 */ @@ -6024,23 +6031,33 @@ static void test_vshader_input(IDirect3DDevice9 *device) 0x03000005, 0xe00f0001, 0xa0e40000, 0x90e40001, /* mul o1, c0, v1 */ 0x0000ffff /* end */ }; - DWORD color_color_shader_code_2[] = { + static const DWORD color_color_shader_code_2[] = + { 0xfffe0200, /* vs_2_0 */ 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x0200001f, 0x8000000a, 0x900f0001, /* dcl_color v1 */ 0x02000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */ - 0x03000005, 0xd00f0000, 0xa0e40000, 0x90e40001, /* mul oD0, c0, v1 */ + 0x03000005, 0xd00f0000, 0xa0e40000, 0x90e40001, /* mul oD0, c0, v1 */ 0x0000ffff /* end */ }; - DWORD color_color_shader_code_1[] = { + static const DWORD color_color_shader_code_1[] = + { 0xfffe0101, /* vs_1_1 */ 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x0000001f, 0x8000000a, 0x900f0001, /* dcl_color v1 */ 0x00000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */ - 0x00000005, 0xd00f0000, 0xa0e40000, 0x90e40001, /* mul oD0, c0, v1 */ + 0x00000005, 0xd00f0000, 0xa0e40000, 0x90e40001, /* mul oD0, c0, v1 */ + 0x0000ffff /* end */ + }; + static const DWORD ps3_code[] = + { + 0xffff0300, /* ps_3_0 */ + 0x0200001f, 0x8000000a, 0x900f0000, /* dcl_color0 v0 */ + 0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */ 0x0000ffff /* end */ }; IDirect3DVertexShader9 *swapped_shader, *texcoord_color_shader, *color_color_shader; + IDirect3DPixelShader9 *ps; HRESULT hr; DWORD color; float quad1[] = { @@ -6159,12 +6176,17 @@ static void test_vshader_input(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_color_float, &decl_color_float); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); + hr = IDirect3DDevice9_CreatePixelShader(device, ps3_code, &ps); + ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); + for(i = 1; i <= 3; i++) { hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear returned %#x.\n", hr); if(i == 3) { hr = IDirect3DDevice9_CreateVertexShader(device, swapped_shader_code_3, &swapped_shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); + hr = IDirect3DDevice9_SetPixelShader(device, ps); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); } else if(i == 2){ hr = IDirect3DDevice9_CreateVertexShader(device, swapped_shader_code_2, &swapped_shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); @@ -6309,6 +6331,7 @@ static void test_vshader_input(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); IDirect3DDevice9_SetVertexShader(device, NULL); + IDirect3DDevice9_SetPixelShader(device, NULL); IDirect3DDevice9_SetVertexDeclaration(device, NULL); IDirect3DVertexShader9_Release(swapped_shader); @@ -6322,6 +6345,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, color_color_shader_code_3, &color_color_shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); + hr = IDirect3DDevice9_SetPixelShader(device, ps); + ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader returned %08x\n", hr); } else if(i == 2){ hr = IDirect3DDevice9_CreateVertexShader(device, texcoord_color_shader_code_2, &texcoord_color_shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader returned %08x\n", hr); @@ -6372,6 +6397,7 @@ static void test_vshader_input(IDirect3DDevice9 *device) } IDirect3DDevice9_SetVertexShader(device, NULL); IDirect3DDevice9_SetVertexDeclaration(device, NULL); + IDirect3DDevice9_SetPixelShader(device, NULL); color = getPixelColor(device, 160, 360); ok(color_match(color, D3DCOLOR_ARGB(0x00, 0xff, 0x80, 0x40), 1), @@ -6402,6 +6428,8 @@ static void test_vshader_input(IDirect3DDevice9 *device) IDirect3DVertexDeclaration9_Release(decl_color_color); IDirect3DVertexDeclaration9_Release(decl_color_ubyte); IDirect3DVertexDeclaration9_Release(decl_color_float); + + IDirect3DPixelShader9_Release(ps); } static void srgbtexture_test(IDirect3DDevice9 *device)
1
0
0
0
Stefan Dösinger : d3d: Make the INTZ test more reliable.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: d8224118abba228b96d133a9c9c25878346272ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d8224118abba228b96d133a9c…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon May 23 22:45:50 2011 +0200 d3d: Make the INTZ test more reliable. --- dlls/d3d8/tests/visual.c | 24 ++++++++++++------------ dlls/d3d9/tests/visual.c | 26 +++++++++++++------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index d2ab518..1e48c03 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -1706,10 +1706,10 @@ static void intz_test(IDirect3DDevice8 *device) } quad[] = { - { -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f}, - { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f}, - { -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { 1.0f, -1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f}, + { -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.5f}, + { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.5f}, + { -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f}, + { 1.0f, -1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.5f}, }; struct { @@ -1718,14 +1718,14 @@ static void intz_test(IDirect3DDevice8 *device) } expected_colors[] = { - {400, 60, D3DCOLOR_ARGB(0x00, 0x9f, 0xff, 0x00)}, - {560, 180, D3DCOLOR_ARGB(0x00, 0xdf, 0x55, 0x00)}, - {560, 300, D3DCOLOR_ARGB(0x00, 0xdf, 0x66, 0x00)}, - {400, 420, D3DCOLOR_ARGB(0x00, 0x9f, 0xb6, 0x00)}, - {240, 420, D3DCOLOR_ARGB(0x00, 0x60, 0x6d, 0x00)}, - { 80, 300, D3DCOLOR_ARGB(0x00, 0x20, 0x33, 0x00)}, - { 80, 180, D3DCOLOR_ARGB(0x00, 0x20, 0x55, 0x00)}, - {240, 60, D3DCOLOR_ARGB(0x00, 0x60, 0xff, 0x00)}, + { 80, 100, D3DCOLOR_ARGB(0x00, 0x20, 0x40, 0x00)}, + {240, 100, D3DCOLOR_ARGB(0x00, 0x60, 0xbf, 0x00)}, + {400, 100, D3DCOLOR_ARGB(0x00, 0x9f, 0x40, 0x00)}, + {560, 100, D3DCOLOR_ARGB(0x00, 0xdf, 0xbf, 0x00)}, + { 80, 450, D3DCOLOR_ARGB(0x00, 0x20, 0x40, 0x00)}, + {240, 450, D3DCOLOR_ARGB(0x00, 0x60, 0xbf, 0x00)}, + {400, 450, D3DCOLOR_ARGB(0x00, 0x9f, 0x40, 0x00)}, + {560, 450, D3DCOLOR_ARGB(0x00, 0xdf, 0xbf, 0x00)}, }; IDirect3DSurface8 *original_ds, *original_rt, *rt; diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 6b30f3e..affd416 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -11099,7 +11099,7 @@ static void intz_test(IDirect3DDevice9 *device) 0x02000001, 0x80010001, 0x80e40000, /* mov r1.x, r0 */ 0x03010042, 0x800f0000, 0xb0e40000, 0xa0e40800, /* texldp r0, t0, s0 */ 0x02000001, 0x80020001, 0x80000000, /* mov r1.y, r0.x */ - 0x02000001, 0x800f0800, 0x80e40001, /* mov 0C0, r1 */ + 0x02000001, 0x800f0800, 0x80e40001, /* mov oC0, r1 */ 0x0000ffff, /* end */ }; struct @@ -11109,10 +11109,10 @@ static void intz_test(IDirect3DDevice9 *device) } quad[] = { - { -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f}, - { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f}, - { -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - { 1.0f, -1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f}, + { -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.5f}, + { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.5f}, + { -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f}, + { 1.0f, -1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.5f}, }; struct { @@ -11121,14 +11121,14 @@ static void intz_test(IDirect3DDevice9 *device) } expected_colors[] = { - {400, 60, D3DCOLOR_ARGB(0x00, 0x9f, 0xff, 0x00)}, - {560, 180, D3DCOLOR_ARGB(0x00, 0xdf, 0x55, 0x00)}, - {560, 300, D3DCOLOR_ARGB(0x00, 0xdf, 0x66, 0x00)}, - {400, 420, D3DCOLOR_ARGB(0x00, 0x9f, 0xb6, 0x00)}, - {240, 420, D3DCOLOR_ARGB(0x00, 0x60, 0x6d, 0x00)}, - { 80, 300, D3DCOLOR_ARGB(0x00, 0x20, 0x33, 0x00)}, - { 80, 180, D3DCOLOR_ARGB(0x00, 0x20, 0x55, 0x00)}, - {240, 60, D3DCOLOR_ARGB(0x00, 0x60, 0xff, 0x00)}, + { 80, 100, D3DCOLOR_ARGB(0x00, 0x20, 0x40, 0x00)}, + {240, 100, D3DCOLOR_ARGB(0x00, 0x60, 0xbf, 0x00)}, + {400, 100, D3DCOLOR_ARGB(0x00, 0x9f, 0x40, 0x00)}, + {560, 100, D3DCOLOR_ARGB(0x00, 0xdf, 0xbf, 0x00)}, + { 80, 450, D3DCOLOR_ARGB(0x00, 0x20, 0x40, 0x00)}, + {240, 450, D3DCOLOR_ARGB(0x00, 0x60, 0xbf, 0x00)}, + {400, 450, D3DCOLOR_ARGB(0x00, 0x9f, 0x40, 0x00)}, + {560, 450, D3DCOLOR_ARGB(0x00, 0xdf, 0xbf, 0x00)}, }; IDirect3DSurface9 *original_ds, *original_rt, *rt;
1
0
0
0
Andrew Eikum : winealsa.drv: Implement device enumeration.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: 934a64cb3804e458da37b0f490b82633010293f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=934a64cb3804e458da37b0f49…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Tue May 24 13:59:36 2011 -0500 winealsa.drv: Implement device enumeration. --- dlls/winealsa.drv/mmdevdrv.c | 177 ++++++++++++++++++++++++++++++++++++++---- 1 files changed, 162 insertions(+), 15 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 854f7b9..20958bf 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -134,6 +134,7 @@ static CRITICAL_SECTION g_sessions_lock; static struct list g_sessions = LIST_INIT(g_sessions); static const WCHAR defaultW[] = {'d','e','f','a','u','l','t',0}; +static const char defname[] = "default"; static const IAudioClientVtbl AudioClient_Vtbl; static const IAudioRenderClientVtbl AudioRenderClient_Vtbl; @@ -206,40 +207,186 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved) return TRUE; } -HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, void ***keys, +static HRESULT alsa_get_card_devices(EDataFlow flow, WCHAR **ids, char **keys, + UINT *num, snd_ctl_t *ctl, int card, const WCHAR *cardnameW) +{ + static const WCHAR dashW[] = {' ','-',' ',0}; + int err, device; + snd_pcm_info_t *info; + + info = HeapAlloc(GetProcessHeap(), 0, snd_pcm_info_sizeof()); + if(!info) + return E_OUTOFMEMORY; + + snd_pcm_info_set_subdevice(info, 0); + snd_pcm_info_set_stream(info, + flow == eRender ? SND_PCM_STREAM_PLAYBACK : SND_PCM_STREAM_CAPTURE); + + device = -1; + for(err = snd_ctl_pcm_next_device(ctl, &device); device != -1 && err >= 0; + err = snd_ctl_pcm_next_device(ctl, &device)){ + const char *devname; + + snd_pcm_info_set_device(info, device); + + if((err = snd_ctl_pcm_info(ctl, info)) < 0){ + if(err == -ENOENT) + /* This device doesn't have the right stream direction */ + continue; + + WARN("Failed to get info for card %d, device %d: %d (%s)\n", + card, device, err, snd_strerror(err)); + continue; + } + + if(ids && keys){ + DWORD len, cardlen; + + devname = snd_pcm_info_get_name(info); + if(!devname){ + WARN("Unable to get device name for card %d, device %d\n", card, + device); + continue; + } + + cardlen = lstrlenW(cardnameW); + len = MultiByteToWideChar(CP_UNIXCP, 0, devname, -1, NULL, 0); + len += lstrlenW(dashW); + len += cardlen; + ids[*num] = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if(!ids[*num]){ + HeapFree(GetProcessHeap(), 0, info); + return E_OUTOFMEMORY; + } + memcpy(ids[*num], cardnameW, cardlen * sizeof(WCHAR)); + memcpy(ids[*num] + cardlen, dashW, lstrlenW(dashW) * sizeof(WCHAR)); + cardlen += lstrlenW(dashW); + MultiByteToWideChar(CP_UNIXCP, 0, devname, -1, ids[*num] + cardlen, + len - cardlen); + + keys[*num] = HeapAlloc(GetProcessHeap(), 0, 32); + if(!keys[*num]){ + HeapFree(GetProcessHeap(), 0, info); + HeapFree(GetProcessHeap(), 0, ids[*num]); + return E_OUTOFMEMORY; + } + sprintf(keys[*num], "hw:%d,%d", card, device); + } + + ++(*num); + } + + HeapFree(GetProcessHeap(), 0, info); + + if(err != 0) + WARN("Got a failure during device enumeration on card %d: %d (%s)\n", + card, err, snd_strerror(err)); + + return S_OK; +} + +static HRESULT alsa_enum_devices(EDataFlow flow, WCHAR **ids, char **keys, + UINT *num) +{ + int err, card; + + card = -1; + *num = 0; + for(err = snd_card_next(&card); card != -1 && err >= 0; + err = snd_card_next(&card)){ + char cardpath[64]; + const char *cardname; + WCHAR *cardnameW; + snd_ctl_t *ctl; + DWORD len; + + sprintf(cardpath, "hw:%u", card); + + if((err = snd_ctl_open(&ctl, cardpath, 0)) < 0){ + WARN("Unable to open ctl for ALSA device %s: %d (%s)\n", cardpath, + err, snd_strerror(err)); + continue; + } + + if((err = snd_card_get_name(card, (char **)&cardname)) < 0){ + WARN("Unable to get card name for ALSA device %s: %d (%s)\n", + cardpath, err, snd_strerror(err)); + /* FIXME: Should be localized */ + cardname = "Unknown soundcard"; + } + + len = MultiByteToWideChar(CP_UNIXCP, 0, cardname, -1, NULL, 0); + cardnameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if(!cardnameW){ + snd_ctl_close(ctl); + return E_OUTOFMEMORY; + } + MultiByteToWideChar(CP_UNIXCP, 0, cardname, -1, cardnameW, len); + + alsa_get_card_devices(flow, ids, keys, num, ctl, card, cardnameW); + + HeapFree(GetProcessHeap(), 0, cardnameW); + + snd_ctl_close(ctl); + } + + if(err != 0) + WARN("Got a failure during card enumeration: %d (%s)\n", + err, snd_strerror(err)); + + return S_OK; +} + +HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, char ***keys, UINT *num, UINT *def_index) { - TRACE("%d %p %p %p\n", flow, ids, num, def_index); + HRESULT hr; - *num = 1; - *def_index = 0; + TRACE("%d %p %p %p %p\n", flow, ids, keys, num, def_index); + + hr = alsa_enum_devices(flow, NULL, NULL, num); + if(FAILED(hr)) + return hr; - *ids = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *)); - if(!*ids) + *ids = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(WCHAR *)); + *keys = HeapAlloc(GetProcessHeap(), 0, (*num + 1) * sizeof(char *)); + if(!*ids || !*keys){ + HeapFree(GetProcessHeap(), 0, *ids); + HeapFree(GetProcessHeap(), 0, *keys); return E_OUTOFMEMORY; + } (*ids)[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(defaultW)); - if(!(*ids)[0]){ + memcpy((*ids)[0], defaultW, sizeof(defaultW)); + (*keys)[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(defname)); + memcpy((*keys)[0], defname, sizeof(defname)); + *def_index = 0; + + hr = alsa_enum_devices(flow, (*ids) + 1, (*keys) + 1, num); + if(FAILED(hr)){ + int i; + for(i = 0; i < *num; ++i){ + HeapFree(GetProcessHeap(), 0, (*ids)[i]); + HeapFree(GetProcessHeap(), 0, (*keys)[i]); + } HeapFree(GetProcessHeap(), 0, *ids); + HeapFree(GetProcessHeap(), 0, *keys); return E_OUTOFMEMORY; } - lstrcpyW((*ids)[0], defaultW); - - *keys = HeapAlloc(GetProcessHeap(), 0, sizeof(void *)); - (*keys)[0] = NULL; + ++(*num); /* for default device */ return S_OK; } -HRESULT WINAPI AUDDRV_GetAudioEndpoint(void *key, IMMDevice *dev, +HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev, EDataFlow dataflow, IAudioClient **out) { ACImpl *This; int err; snd_pcm_stream_t stream; - TRACE("%p %p %d %p\n", key, dev, dataflow, out); + TRACE("\"%s\" %p %d %p\n", key, dev, dataflow, out); This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ACImpl)); if(!This) @@ -262,10 +409,10 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(void *key, IMMDevice *dev, } This->dataflow = dataflow; - if((err = snd_pcm_open(&This->pcm_handle, "default", stream, + if((err = snd_pcm_open(&This->pcm_handle, key, stream, SND_PCM_NONBLOCK)) < 0){ HeapFree(GetProcessHeap(), 0, This); - WARN("Unable to open PCM \"default\": %d (%s)\n", err, + WARN("Unable to open PCM \"%s\": %d (%s)\n", key, err, snd_strerror(err)); return E_FAIL; }
1
0
0
0
Frédéric Delanoy : po: Update French translation.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: 32d7f32c9734defac31d592fcbd505cba16ee0e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32d7f32c9734defac31d592fc…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue May 24 20:20:32 2011 +0200 po: Update French translation. --- po/fr.po | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/po/fr.po b/po/fr.po index 6ac96d9..80ca780 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8480,18 +8480,19 @@ msgstr "La ligne d'entrée est trop longue.\n" #: hostname.rc:27 msgid "Usage: hostname\n" -msgstr "" +msgstr "Usage : hostname\n" #: hostname.rc:28 -#, fuzzy msgid "Error: Invalid option '%c'.\n" -msgstr "Erreur : nom de clé invalide\n" +msgstr "Erreur : option « %c » invalide.\n" #: hostname.rc:29 msgid "" "Error: Setting the system hostname is not possible with the hostname " "utility.\n" msgstr "" +"Erreur : impossible de spécifier le nom d'hôte système avec l'utilitaire " +"hostname.\n" #: ipconfig.rc:27 msgid "Usage: ipconfig [ /? | /all ]\n"
1
0
0
0
Stefan Dösinger : wined3d: CMP supports _SAT.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: dbd878639424071e1d4c6cfc9bcc75906a4b2b8a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dbd878639424071e1d4c6cfc9…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sun May 22 13:54:57 2011 +0200 wined3d: CMP supports _SAT. This is a partial revert of c9ef1ed28c861bc862c92ff68aa37b4ddf01cc39. I don't know where I got the idea that CMP does not support _SAT, but I suspect that my driver at the time was broken. --- dlls/wined3d/arb_program_shader.c | 28 +++++++--------------------- 1 files changed, 7 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index cefb6e5..55435d4 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -1588,7 +1588,6 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins) char src_name[3][50]; DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); - BOOL is_color; shader_arb_get_dst_param(ins, dst, dst_name); shader_arb_get_src_param(ins, &ins->src[1], 1, src_name[1]); @@ -1597,7 +1596,9 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins) if (shader_version <= WINED3D_SHADER_VERSION(1, 3) && ins->coissue) { shader_addline(buffer, "MOV%s %s, %s;\n", shader_arb_get_modifier(ins), dst_name, src_name[1]); - } else { + } + else + { struct wined3d_shader_src_param src0_copy = ins->src[0]; char extra_neg; @@ -1607,15 +1608,8 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins) shader_arb_get_src_param(ins, &src0_copy, 0, src_name[0]); shader_arb_get_src_param(ins, &ins->src[2], 2, src_name[2]); shader_addline(buffer, "ADD TA, %c%s, coefdiv.x;\n", extra_neg, src_name[0]); - /* No modifiers supported on CMP */ - shader_addline(buffer, "CMP %s, TA, %s, %s;\n", dst_name, src_name[1], src_name[2]); - - /* _SAT on CMP doesn't make much sense, but it is not a pure NOP */ - if(ins->dst[0].modifiers & WINED3DSPDM_SATURATE) - { - shader_arb_get_register_name(ins, &dst->reg, src_name[0], &is_color); - shader_addline(buffer, "MOV_SAT %s, %s;\n", dst_name, dst_name); - } + shader_addline(buffer, "CMP%s %s, TA, %s, %s;\n", shader_arb_get_modifier(ins), + dst_name, src_name[1], src_name[2]); } } @@ -1625,7 +1619,6 @@ static void pshader_hw_cmp(const struct wined3d_shader_instruction *ins) struct wined3d_shader_buffer *buffer = ins->ctx->buffer; char dst_name[50]; char src_name[3][50]; - BOOL is_color; shader_arb_get_dst_param(ins, dst, dst_name); @@ -1634,15 +1627,8 @@ static void pshader_hw_cmp(const struct wined3d_shader_instruction *ins) shader_arb_get_src_param(ins, &ins->src[1], 1, src_name[1]); shader_arb_get_src_param(ins, &ins->src[2], 2, src_name[2]); - /* No modifiers are supported on CMP */ - shader_addline(buffer, "CMP %s, %s, %s, %s;\n", dst_name, - src_name[0], src_name[2], src_name[1]); - - if(ins->dst[0].modifiers & WINED3DSPDM_SATURATE) - { - shader_arb_get_register_name(ins, &dst->reg, src_name[0], &is_color); - shader_addline(buffer, "MOV_SAT %s, %s;\n", dst_name, src_name[0]); - } + shader_addline(buffer, "CMP%s %s, %s, %s, %s;\n", shader_arb_get_modifier(ins), + dst_name, src_name[0], src_name[2], src_name[1]); } /** Process the WINED3DSIO_DP2ADD instruction in ARB.
1
0
0
0
Aric Stewart : usp10/test: Add Tibetan shaping test.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: c5f2ac3eeaf778a1396295f6302f40af667c4920 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5f2ac3eeaf778a1396295f63…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue May 24 14:40:56 2011 -0500 usp10/test: Add Tibetan shaping test. --- dlls/usp10/tests/usp10.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 742dbec..b9e4ed5 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -633,6 +633,28 @@ static void test_ScriptShapeOpenType(HDC hdc) {1,{{SCRIPT_JUSTIFY_CHARACTER,1,0,0,0,0},0}}, {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}} }; + /* Tibetan */ + static const WCHAR test_tibetan[] = {0x0f04, 0x0f05, 0x0f0e, 0x0020, 0x0f51, 0x0f7c, 0x0f53, 0x0f0b, 0x0f5a, 0x0f53, 0x0f0b, 0x0f51, 0x0f44, 0x0f0b, 0x0f54, 0x0f7c, 0x0f0d}; + static const shapeTest_char tibetan_c[] = {{0,{0,0}},{1,{0,0}},{2,{0,0}},{3,{1,0}},{4,{0,0}},{4,{0,0}},{6,{0,0}},{7,{0,0}},{8,{0,0}},{9,{0,0}},{10,{0,0}},{11,{0,0}},{12,{0,0}},{13,{0,0}},{14,{0,0}},{14,{0,0}},{16,{0,0}}}; + static const shapeTest_glyph tibetan_g[] = { + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_BLANK,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}} }; + if (!pScriptItemizeOpenType || !pScriptShapeOpenType) { win_skip("ScriptShapeOpenType not available on this platform\n"); @@ -721,6 +743,14 @@ static void test_ScriptShapeOpenType(HDC hdc) SelectObject(hdc, hfont_orig); DeleteObject(hfont); } + + test_valid = find_font_for_range(hdc, "Microsoft Himalaya", 70, test_tibetan[0], &hfont, &hfont_orig); + if (hfont != NULL) + { + test_shape_ok_valid(test_valid, hdc, test_tibetan, 17, &Control, &State, 0, 17, tibetan_c, tibetan_g); + SelectObject(hdc, hfont_orig); + DeleteObject(hfont); + } } static void test_ScriptShape(HDC hdc)
1
0
0
0
Aric Stewart : usp10: Determine glyph properties after shaping for Tibetan script.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: 2b3da5389cb0ceb182070a14a2a6f8ba6df2f4de URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b3da5389cb0ceb182070a14a…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue May 24 14:40:50 2011 -0500 usp10: Determine glyph properties after shaping for Tibetan script. --- dlls/usp10/shape.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 49 insertions(+), 2 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 047acc5..24e91f8 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -51,6 +51,7 @@ static void ShapeCharGlyphProp_Default( HDC hdc, ScriptCache* psc, SCRIPT_ANALYS static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); static void ShapeCharGlyphProp_Thai( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); static void ShapeCharGlyphProp_None( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); +static void ShapeCharGlyphProp_Tibet( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp ); extern const unsigned short wine_shaping_table[]; extern const unsigned short wine_shaping_forms[LAST_ARABIC_CHAR - FIRST_ARABIC_CHAR + 1][4]; @@ -399,8 +400,8 @@ static const ScriptShapeData ShapingData[] = {{ standard_features, 2}, NULL, "armn", NULL, NULL}, {{ standard_features, 2}, NULL, "geor", NULL, NULL}, {{ sinhala_features, 7}, NULL, "sinh", NULL, NULL}, - {{ tibetan_features, 2}, NULL, "tibt", NULL, ShapeCharGlyphProp_None}, - {{ tibetan_features, 2}, NULL, "tibt", NULL, ShapeCharGlyphProp_None}, + {{ tibetan_features, 2}, NULL, "tibt", NULL, ShapeCharGlyphProp_Tibet}, + {{ tibetan_features, 2}, NULL, "tibt", NULL, ShapeCharGlyphProp_Tibet}, {{ tibetan_features, 2}, NULL, "phag", ContextualShape_Phags_pa, ShapeCharGlyphProp_Thai}, {{ thai_features, 1}, NULL, "thai", NULL, ShapeCharGlyphProp_Thai}, {{ thai_features, 1}, NULL, "thai", NULL, ShapeCharGlyphProp_Thai}, @@ -1740,6 +1741,52 @@ static void ShapeCharGlyphProp_None( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); } +static void ShapeCharGlyphProp_Tibet( HDC hdc, ScriptCache* psc, SCRIPT_ANALYSIS* psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD* pwLogClust, SCRIPT_CHARPROP* pCharProp, SCRIPT_GLYPHPROP* pGlyphProp) +{ + int i,k; + + for (i = 0; i < cGlyphs; i++) + { + int char_index[20]; + int char_count = 0; + + for (k = 0; k < cChars; k++) + { + if (pwLogClust[k] == i) + { + char_index[char_count] = k; + char_count++; + } + } + + if (char_count == 0) + { + FIXME("No chars in this glyph? Must be an error\n"); + continue; + } + + if (char_count ==1 && pwcChars[char_index[0]] == 0x0020) /* space */ + { + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_BLANK; + pCharProp[char_index[0]].fCanGlyphAlone = 1; + } + else + pGlyphProp[i].sva.uJustification = SCRIPT_JUSTIFY_NONE; + } + GDEF_UpdateGlyphProps(hdc, pwGlyphs, cGlyphs, pwLogClust, pGlyphProp); + UpdateClustersFromGlyphProp(cGlyphs, cChars, pwLogClust, pGlyphProp); + + /* Tibeten script does not set sva.fDiacritic or sva.fZeroWidth */ + for (i = 0; i < cGlyphs; i++) + { + if (!pGlyphProp[i].sva.fClusterStart) + { + pGlyphProp[i].sva.fDiacritic = 0; + pGlyphProp[i].sva.fZeroWidth = 0; + } + } +} + void SHAPE_CharGlyphProp(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WCHAR* pwcChars, const INT cChars, const WORD* pwGlyphs, const INT cGlyphs, WORD *pwLogClust, SCRIPT_CHARPROP *pCharProp, SCRIPT_GLYPHPROP *pGlyphProp) { if (ShapingData[psa->eScript].charGlyphPropProc)
1
0
0
0
Aric Stewart : usp10/test: Make sure to only trace on _test_shape_ok number of glyphs if font is not valid .
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: 850336d936dd50231247e395b0dd200340f9745f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=850336d936dd50231247e395b…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue May 24 14:40:28 2011 -0500 usp10/test: Make sure to only trace on _test_shape_ok number of glyphs if font is not valid. --- dlls/usp10/tests/usp10.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index ac78514..742dbec 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -367,7 +367,7 @@ static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string, winetest_trace("%i: invalid fCanGlyphAlone\n",x); } - if(valid) + if (valid > 0) winetest_ok(nGlyphs == outnGlyphs, "got incorrect number of glyphs (%i)\n",outnGlyphs); else if (nGlyphs != outnGlyphs) winetest_trace("got incorrect number of glyphs (%i)\n",outnGlyphs);
1
0
0
0
Nikolay Sivov : comctl32/treeview: TVM_EXPAND with TVE_TOGGLE action shouldn' t always notify as it does on user input.
by Alexandre Julliard
25 May '11
25 May '11
Module: wine Branch: master Commit: bcb98d11ba6702165bf80e0fbc2b3aaef7b43c74 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bcb98d11ba6702165bf80e0fb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue May 24 13:25:47 2011 +0400 comctl32/treeview: TVM_EXPAND with TVE_TOGGLE action shouldn't always notify as it does on user input. --- dlls/comctl32/tests/treeview.c | 33 +++++++++++++++++++++++++-------- dlls/comctl32/treeview.c | 10 +++++----- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 0437d65..5fd26a0 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -1302,12 +1302,12 @@ static void test_expandnotify(void) item.state = TVIS_EXPANDED; ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); - ok(ret == TRUE, "got %d\n", ret); + expect(TRUE, ret); ok((item.state & TVIS_EXPANDED) == 0, "expected collapsed\n"); /* preselect root node here */ ret = SendMessageA(hTree, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hRoot); - ok(ret == TRUE, "got %d\n", ret); + expect(TRUE, ret); g_get_from_expand = TRUE; /* expand */ @@ -1315,7 +1315,7 @@ static void test_expandnotify(void) g_item_expanding.state = 0xdeadbeef; g_item_expanded.state = 0xdeadbeef; ret = SendMessageA(hTree, TVM_EXPAND, TVE_EXPAND, (LPARAM)hRoot); - ok(ret == TRUE, "got %d\n", ret); + expect(TRUE, ret); ok(g_item_expanding.state == TVIS_SELECTED, "got state on TVN_ITEMEXPANDING 0x%08x\n", g_item_expanding.state); ok(g_item_expanded.state == (TVIS_SELECTED|TVIS_EXPANDED), "got state on TVN_ITEMEXPANDED 0x%08x\n", @@ -1326,16 +1326,16 @@ static void test_expandnotify(void) /* check that it's expanded */ item.state = TVIS_EXPANDED; ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); - ok(ret == TRUE, "got %d\n", ret); + expect(TRUE, ret); ok((item.state & TVIS_EXPANDED) == TVIS_EXPANDED, "expected expanded\n"); /* collapse */ flush_sequences(sequences, NUM_MSG_SEQUENCES); ret = SendMessageA(hTree, TVM_EXPAND, TVE_COLLAPSE, (LPARAM)hRoot); - ok(ret == TRUE, "got %d\n", ret); + expect(TRUE, ret); item.state = TVIS_EXPANDED; ret = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item); - ok(ret == TRUE, "got %d\n", ret); + expect(TRUE, ret); ok((item.state & TVIS_EXPANDED) == 0, "expected collapsed\n"); /* all next collapse/expand attempts won't produce any notifications, the only way is to reset with all children removed */ @@ -1345,7 +1345,7 @@ static void test_expandnotify(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); ret = SendMessageA(hTree, TVM_EXPAND, TVE_TOGGLE, (LPARAM)hChild); expect(FALSE, ret); - ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "toggle node without children", TRUE); + ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "toggle node without children", FALSE); DestroyWindow(hTree); @@ -1354,8 +1354,25 @@ static void test_expandnotify(void) fill_tree(hTree); g_get_rect_in_expand = TRUE; ret = TreeView_Select(hTree, hChild, TVGN_CARET); + expect(TRUE, ret); g_get_rect_in_expand = FALSE; - ok(ret, "got %d\n", ret); + + DestroyWindow(hTree); + + /* TVE_TOGGLE acts as any other TVM_EXPAND */ + hTree = create_treeview_control(0); + fill_tree(hTree); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + ret = SendMessageA(hTree, TVM_EXPAND, TVE_TOGGLE, (LPARAM)hRoot); + expect(TRUE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, parent_expand_seq, "toggle node (expand)", FALSE); + + /* toggle again - no notifications */ + flush_sequences(sequences, NUM_MSG_SEQUENCES); + ret = SendMessageA(hTree, TVM_EXPAND, TVE_TOGGLE, (LPARAM)hRoot); + expect(TRUE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "toggle node (collapse)", FALSE); DestroyWindow(hTree); } diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 2388d3c..bd65fca 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3489,14 +3489,14 @@ static void TREEVIEW_SingleExpand(TREEVIEW_INFO *infoPtr, } static BOOL -TREEVIEW_Toggle(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, BOOL bUser) +TREEVIEW_Toggle(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, BOOL user) { - TRACE("\n"); + TRACE("item=%p, user=%d\n", item, user); if (item->state & TVIS_EXPANDED) - return TREEVIEW_Collapse(infoPtr, item, FALSE, bUser); + return TREEVIEW_Collapse(infoPtr, item, FALSE, user); else - return TREEVIEW_Expand(infoPtr, item, FALSE, bUser); + return TREEVIEW_Expand(infoPtr, item, FALSE, user); } static VOID @@ -3538,7 +3538,7 @@ TREEVIEW_ExpandMsg(TREEVIEW_INFO *infoPtr, UINT flag, HTREEITEM item) FALSE); case TVE_TOGGLE: - return TREEVIEW_Toggle(infoPtr, item, TRUE); + return TREEVIEW_Toggle(infoPtr, item, FALSE); default: return 0;
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
95
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Results per page:
10
25
50
100
200