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
June 2012
----- 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
3 participants
827 discussions
Start a n
N
ew thread
Daniel Jelinski : regedit: Make key names editable also with native comctl32.
by Alexandre Julliard
04 Jun '12
04 Jun '12
Module: wine Branch: master Commit: 14d4702c1b1062466674e1dbe9a9c34ffc1b7b4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14d4702c1b1062466674e1dbe…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Sat Jun 2 07:13:28 2012 +0200 regedit: Make key names editable also with native comctl32. --- programs/regedit/treeview.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c index 2257fdd..7c5e76d 100644 --- a/programs/regedit/treeview.c +++ b/programs/regedit/treeview.c @@ -681,7 +681,7 @@ HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id) /* Get the dimensions of the parent window's client area, and create the tree view control. */ GetClientRect(hwndParent, &rcClient); hwndTV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_TREEVIEWW, TreeView, - WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT, + WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_EDITLABELS, 0, 0, rcClient.right, rcClient.bottom, hwndParent, ULongToHandle(id), hInst, NULL); SendMessageW(hwndTV, TVM_SETUNICODEFORMAT, TRUE, 0);
1
0
0
0
Józef Kucia : d3dx9/tests: Add tests for DDS header handling.
by Alexandre Julliard
04 Jun '12
04 Jun '12
Module: wine Branch: master Commit: cbb9002aa65a2e923015d8073d2d07b9585d97c5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbb9002aa65a2e923015d8073…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Fri Jun 1 18:04:48 2012 +0200 d3dx9/tests: Add tests for DDS header handling. --- dlls/d3dx9_36/tests/surface.c | 189 +++++++++++++++++++++++++++++++++-------- 1 files changed, 154 insertions(+), 35 deletions(-) diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 78ec0ca..3b8ed6e 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -19,6 +19,7 @@ */ #define COBJMACROS +#include <assert.h> #include "wine/test.h" #include "d3dx9tex.h" #include "resources.h" @@ -138,13 +139,18 @@ static HRESULT create_file(const char *filename, const unsigned char *data, cons return D3DERR_INVALIDCALL; } +/* dds_header.flags */ #define DDS_CAPS 0x00000001 #define DDS_HEIGHT 0x00000002 #define DDS_WIDTH 0x00000004 +#define DDS_PITCH 0x00000008 #define DDS_PIXELFORMAT 0x00001000 +#define DDS_LINEARSIZE 0x00080000 +/* dds_header.caps */ #define DDS_CAPS_TEXTURE 0x00001000 +/* dds_pixel_format.flags */ #define DDS_PF_ALPHA 0x00000001 #define DDS_PF_ALPHA_ONLY 0x00000002 #define DDS_PF_FOURCC 0x00000004 @@ -152,6 +158,57 @@ static HRESULT create_file(const char *filename, const unsigned char *data, cons #define DDS_PF_LUMINANCE 0x00020000 #define DDS_PF_BUMPDUDV 0x00080000 +struct dds_pixel_format +{ + DWORD size; + DWORD flags; + DWORD fourcc; + DWORD bpp; + DWORD rmask; + DWORD gmask; + DWORD bmask; + DWORD amask; +}; + +struct dds_header +{ + DWORD magic; + DWORD size; + DWORD flags; + DWORD height; + DWORD width; + DWORD pitch_or_linear_size; + DWORD depth; + DWORD miplevels; + DWORD reserved[11]; + struct dds_pixel_format pixel_format; + DWORD caps; + DWORD caps2; + DWORD reserved2[3]; +}; + +/* fills dds_header with reasonable default values */ +static void fill_dds_header(struct dds_header *header) +{ + memset(header, 0, sizeof(*header)); + + header->magic = MAKEFOURCC('D','D','S',' '); + header->size = sizeof(*header); + header->flags = DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT; + header->height = 4; + header->width = 4; + header->pixel_format.size = sizeof(header->pixel_format); + /* X8R8G8B8 */ + header->pixel_format.flags = DDS_PF_RGB; + header->pixel_format.fourcc = 0; + header->pixel_format.bpp = 32; + header->pixel_format.rmask = 0xff0000; + header->pixel_format.gmask = 0x00ff00; + header->pixel_format.bmask = 0x0000ff; + header->pixel_format.amask = 0; + header->caps = DDS_CAPS_TEXTURE; +} + static void check_dds_pixel_format(DWORD flags, DWORD fourcc, DWORD bpp, DWORD rmask, DWORD gmask, DWORD bmask, DWORD amask, D3DFORMAT expected_format) @@ -160,44 +217,19 @@ static void check_dds_pixel_format(DWORD flags, DWORD fourcc, DWORD bpp, D3DXIMAGE_INFO info; struct { - DWORD magic; - DWORD size; - DWORD flags; - DWORD height; - DWORD width; - DWORD padding[14]; - struct - { - DWORD size; - DWORD flags; - DWORD fourcc; - DWORD bpp; - DWORD rmask; - DWORD gmask; - DWORD bmask; - DWORD amask; - } pixel_format; - DWORD caps; - DWORD padding2[4]; + struct dds_header header; BYTE data[256]; } dds; - memset(&dds, 0, sizeof(dds)); - - dds.magic = MAKEFOURCC('D','D','S',' '); - dds.size = 124; - dds.flags = DDS_CAPS | DDS_WIDTH | DDS_HEIGHT | DDS_PIXELFORMAT; - dds.height = 4; - dds.width = 4; - dds.pixel_format.size = sizeof(dds.pixel_format); - dds.pixel_format.flags = flags; - dds.pixel_format.fourcc = fourcc; - dds.pixel_format.bpp = bpp; - dds.pixel_format.rmask = rmask; - dds.pixel_format.gmask = gmask; - dds.pixel_format.bmask = bmask; - dds.pixel_format.amask = amask; - dds.caps = DDS_CAPS_TEXTURE; + fill_dds_header(&dds.header); + dds.header.pixel_format.flags = flags; + dds.header.pixel_format.fourcc = fourcc; + dds.header.pixel_format.bpp = bpp; + dds.header.pixel_format.rmask = rmask; + dds.header.pixel_format.gmask = gmask; + dds.header.pixel_format.bmask = bmask; + dds.header.pixel_format.amask = amask; + memset(dds.data, 0, sizeof(dds.data)); hr = D3DXGetImageInfoFromFileInMemory(&dds, sizeof(dds), &info); ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x for pixel format %#x, expected %#x\n", hr, expected_format, D3D_OK); @@ -205,6 +237,91 @@ static void check_dds_pixel_format(DWORD flags, DWORD fourcc, DWORD bpp, ok(info.Format == expected_format, "D3DXGetImageInfoFromFileInMemory returned format %#x, expected %#x\n", info.Format, expected_format); } +static void test_dds_header_handling(void) +{ + int i; + HRESULT hr; + D3DXIMAGE_INFO info; + struct + { + struct dds_header header; + BYTE data[256]; + } dds; + + struct + { + struct dds_pixel_format pixel_format; + DWORD flags; + DWORD width; + DWORD height; + DWORD pitch; + DWORD pixel_data_size; + HRESULT expected_result; + } tests[] = { + /* pitch is ignored */ + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, 0, 4, 4, 0, + 63 /* pixel data size */, D3DXERR_INVALIDDATA }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, 0 /* pitch */, + 64, D3D_OK }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, 1 /* pitch */, + 64, D3D_OK }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, 2 /* pitch */, + 64, D3D_OK }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, 3 /* pitch */, + 64, D3D_OK }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, 4 /* pitch */, + 64, D3D_OK }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, 16 /* pitch */, + 64, D3D_OK }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, 1024 /* pitch */, + 64, D3D_OK }, + { { 32, DDS_PF_RGB | DDS_PF_ALPHA, 0, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, DDS_PITCH, 4, 4, -1 /* pitch */, + 64, D3D_OK }, + /* linear size is ignored */ + { { 32, DDS_PF_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 }, 0, 4, 4, 0, + 7 /* pixel data size */, D3DXERR_INVALIDDATA }, + { { 32, DDS_PF_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 }, DDS_LINEARSIZE, 4, 4, 0 /* linear size */, + 8, D3D_OK }, + { { 32, DDS_PF_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 }, DDS_LINEARSIZE, 4, 4, 1 /* linear size */, + 8, D3D_OK }, + { { 32, DDS_PF_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 }, DDS_LINEARSIZE, 4, 4, 2 /* linear size */, + 8, D3D_OK }, + { { 32, DDS_PF_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 }, DDS_LINEARSIZE, 4, 4, 9 /* linear size */, + 8, D3D_OK }, + { { 32, DDS_PF_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 }, DDS_LINEARSIZE, 4, 4, 16 /* linear size */, + 8, D3D_OK }, + { { 32, DDS_PF_FOURCC, MAKEFOURCC('D','X','T','1'), 0, 0, 0, 0, 0 }, DDS_LINEARSIZE, 4, 4, -1 /* linear size */, + 8, D3D_OK }, + /* integer overflows */ + { { 32, DDS_PF_RGB, 0, 32, 0xff0000, 0x00ff00, 0x0000ff, 0 }, 0, 0x80000000, 0x80000000 /* 0x80000000 * 0x80000000 * 4 = 0 */, 0, + 64, D3D_OK }, + { { 32, DDS_PF_RGB, 0, 32, 0xff0000, 0x00ff00, 0x0000ff, 0 }, 0, 0x8000100, 0x800100 /* 0x8000100 * 0x800100 * 4 = 262144 */, 0, + 64, D3DXERR_INVALIDDATA }, + { { 32, DDS_PF_RGB, 0, 32, 0xff0000, 0x00ff00, 0x0000ff, 0 }, 0, 0x80000001, 0x80000001 /* 0x80000001 * 0x80000001 * 4 = 4 */, 0, + 4, D3D_OK }, + { { 32, DDS_PF_RGB, 0, 32, 0xff0000, 0x00ff00, 0x0000ff, 0 }, 0, 0x80000001, 0x80000001 /* 0x80000001 * 0x80000001 * 4 = 4 */, 0, + 3 /* pixel data size */, D3DXERR_INVALIDDATA } + }; + + memset(&dds, 0, sizeof(dds)); + + for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) + { + DWORD file_size = sizeof(dds.header) + tests[i].pixel_data_size; + assert(file_size <= sizeof(dds)); + + fill_dds_header(&dds.header); + dds.header.flags |= tests[i].flags; + dds.header.width = tests[i].width; + dds.header.height = tests[i].height; + dds.header.pitch_or_linear_size = tests[i].pitch; + memcpy(&dds.header.pixel_format, &tests[i].pixel_format, sizeof(struct dds_pixel_format)); + + hr = D3DXGetImageInfoFromFileInMemory(&dds, file_size, &info); + ok(hr == tests[i].expected_result, "%d: D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", i, hr, tests[i].expected_result); + } +} + static void test_D3DXGetImageInfo(void) { HRESULT hr; @@ -404,6 +521,8 @@ static void test_D3DXGetImageInfo(void) check_dds_pixel_format(DDS_PF_BUMPDUDV, 0, 16, 0x00ff, 0xff00, 0, 0, D3DFMT_V8U8); check_dds_pixel_format(DDS_PF_BUMPDUDV, 0, 32, 0x0000ffff, 0xffff0000, 0, 0, D3DFMT_V16U16); + test_dds_header_handling(); + hr = D3DXGetImageInfoFromFileInMemory(dds_16bit, sizeof(dds_16bit) - 1, &info); ok(hr == D3DXERR_INVALIDDATA, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA);
1
0
0
0
Henri Verbeet : d3d9: Get rid of IDirect3DVertexDeclaration9Impl.
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: bdd42942c0157cf0f01ba02fea482bc90dae97d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdd42942c0157cf0f01ba02fe…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jun 1 17:22:52 2012 +0200 d3d9: Get rid of IDirect3DVertexDeclaration9Impl. --- dlls/d3d9/d3d9_private.h | 36 +++++----------- dlls/d3d9/device.c | 22 +++++----- dlls/d3d9/vertexdeclaration.c | 90 ++++++++++++++++++++--------------------- 3 files changed, 67 insertions(+), 81 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=bdd42942c0157cf0f01ba…
1
0
0
0
Henri Verbeet : d3d9: Get rid of IDirect3DStateBlock9Impl.
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: 79d62ca1fb9cbee24368fc831ca70ced22588588 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79d62ca1fb9cbee24368fc831…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jun 1 17:22:51 2012 +0200 d3d9: Get rid of IDirect3DStateBlock9Impl. --- dlls/d3d9/d3d9_private.h | 24 ++++--------- dlls/d3d9/device.c | 4 +- dlls/d3d9/stateblock.c | 87 ++++++++++++++++++++++----------------------- 3 files changed, 52 insertions(+), 63 deletions(-) diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 5e44f43..0105010 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -245,25 +245,15 @@ HRESULT volumetexture_init(struct d3d9_texture *texture, struct d3d9_device *dev UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN; struct d3d9_texture *unsafe_impl_from_IDirect3DBaseTexture9(IDirect3DBaseTexture9 *iface) DECLSPEC_HIDDEN; -/* ----------------------- */ -/* IDirect3DStateBlock9 */ -/* ----------------------- */ - -/***************************************************************************** - * IDirect3DStateBlock9 implementation structure - */ -typedef struct IDirect3DStateBlock9Impl { - IDirect3DStateBlock9 IDirect3DStateBlock9_iface; - LONG ref; - - /* IDirect3DStateBlock9 fields */ +struct d3d9_stateblock +{ + IDirect3DStateBlock9 IDirect3DStateBlock9_iface; + LONG refcount; struct wined3d_stateblock *wined3d_stateblock; + IDirect3DDevice9Ex *parent_device; +}; - /* Parent reference */ - IDirect3DDevice9Ex *parentDevice; -} IDirect3DStateBlock9Impl; - -HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, struct d3d9_device *device, +HRESULT stateblock_init(struct d3d9_stateblock *stateblock, struct d3d9_device *device, D3DSTATEBLOCKTYPE type, struct wined3d_stateblock *wined3d_stateblock) DECLSPEC_HIDDEN; /* --------------------------- */ diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 93b00f8..d17887f 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1525,7 +1525,7 @@ static HRESULT WINAPI d3d9_device_CreateStateBlock(IDirect3DDevice9Ex *iface, D3DSTATEBLOCKTYPE type, IDirect3DStateBlock9 **stateblock) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); - IDirect3DStateBlock9Impl *object; + struct d3d9_stateblock *object; HRESULT hr; TRACE("iface %p, type %#x, stateblock %p.\n", iface, type, stateblock); @@ -1575,7 +1575,7 @@ static HRESULT WINAPI d3d9_device_EndStateBlock(IDirect3DDevice9Ex *iface, IDire { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); struct wined3d_stateblock *wined3d_stateblock; - IDirect3DStateBlock9Impl *object; + struct d3d9_stateblock *object; HRESULT hr; TRACE("iface %p, stateblock %p.\n", iface, stateblock); diff --git a/dlls/d3d9/stateblock.c b/dlls/d3d9/stateblock.c index 8e08684..8ec8db9 100644 --- a/dlls/d3d9/stateblock.c +++ b/dlls/d3d9/stateblock.c @@ -25,67 +25,66 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); -static inline IDirect3DStateBlock9Impl *impl_from_IDirect3DStateBlock9(IDirect3DStateBlock9 *iface) +static inline struct d3d9_stateblock *impl_from_IDirect3DStateBlock9(IDirect3DStateBlock9 *iface) { - return CONTAINING_RECORD(iface, IDirect3DStateBlock9Impl, IDirect3DStateBlock9_iface); + return CONTAINING_RECORD(iface, struct d3d9_stateblock, IDirect3DStateBlock9_iface); } -static HRESULT WINAPI IDirect3DStateBlock9Impl_QueryInterface(IDirect3DStateBlock9 *iface, - REFIID riid, void **ppobj) +static HRESULT WINAPI d3d9_stateblock_QueryInterface(IDirect3DStateBlock9 *iface, REFIID riid, void **out) { - TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), ppobj); + TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); if (IsEqualGUID(riid, &IID_IDirect3DStateBlock9) || IsEqualGUID(riid, &IID_IUnknown)) { IDirect3DStateBlock9_AddRef(iface); - *ppobj = iface; + *out = iface; return S_OK; } WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); - *ppobj = NULL; + *out = NULL; return E_NOINTERFACE; } -static ULONG WINAPI IDirect3DStateBlock9Impl_AddRef(IDirect3DStateBlock9 *iface) +static ULONG WINAPI d3d9_stateblock_AddRef(IDirect3DStateBlock9 *iface) { - IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); - ULONG ref = InterlockedIncrement(&This->ref); + struct d3d9_stateblock *stateblock = impl_from_IDirect3DStateBlock9(iface); + ULONG refcount = InterlockedIncrement(&stateblock->refcount); - TRACE("%p increasing refcount to %u.\n", iface, ref); + TRACE("%p increasing refcount to %u.\n", iface, refcount); - return ref; + return refcount; } -static ULONG WINAPI IDirect3DStateBlock9Impl_Release(IDirect3DStateBlock9 *iface) +static ULONG WINAPI d3d9_stateblock_Release(IDirect3DStateBlock9 *iface) { - IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); - ULONG ref = InterlockedDecrement(&This->ref); + struct d3d9_stateblock *stateblock = impl_from_IDirect3DStateBlock9(iface); + ULONG refcount = InterlockedDecrement(&stateblock->refcount); - TRACE("%p decreasing refcount to %u.\n", iface, ref); + TRACE("%p decreasing refcount to %u.\n", iface, refcount); - if (ref == 0) { + if (!refcount) + { wined3d_mutex_lock(); - wined3d_stateblock_decref(This->wined3d_stateblock); + wined3d_stateblock_decref(stateblock->wined3d_stateblock); wined3d_mutex_unlock(); - IDirect3DDevice9Ex_Release(This->parentDevice); - HeapFree(GetProcessHeap(), 0, This); + IDirect3DDevice9Ex_Release(stateblock->parent_device); + HeapFree(GetProcessHeap(), 0, stateblock); } - return ref; + + return refcount; } -/* IDirect3DStateBlock9 Interface follow: */ -static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(IDirect3DStateBlock9 *iface, - IDirect3DDevice9 **device) +static HRESULT WINAPI d3d9_stateblock_GetDevice(IDirect3DStateBlock9 *iface, IDirect3DDevice9 **device) { - IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); + struct d3d9_stateblock *stateblock = impl_from_IDirect3DStateBlock9(iface); TRACE("iface %p, device %p.\n", iface, device); - *device = (IDirect3DDevice9 *)This->parentDevice; + *device = (IDirect3DDevice9 *)stateblock->parent_device; IDirect3DDevice9_AddRef(*device); TRACE("Returning device %p.\n", *device); @@ -93,54 +92,54 @@ static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(IDirect3DStateBlock9 *i return D3D_OK; } -static HRESULT WINAPI IDirect3DStateBlock9Impl_Capture(IDirect3DStateBlock9 *iface) +static HRESULT WINAPI d3d9_stateblock_Capture(IDirect3DStateBlock9 *iface) { - IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); + struct d3d9_stateblock *stateblock = impl_from_IDirect3DStateBlock9(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = wined3d_stateblock_capture(This->wined3d_stateblock); + hr = wined3d_stateblock_capture(stateblock->wined3d_stateblock); wined3d_mutex_unlock(); return hr; } -static HRESULT WINAPI IDirect3DStateBlock9Impl_Apply(IDirect3DStateBlock9 *iface) +static HRESULT WINAPI d3d9_stateblock_Apply(IDirect3DStateBlock9 *iface) { - IDirect3DStateBlock9Impl *This = impl_from_IDirect3DStateBlock9(iface); + struct d3d9_stateblock *stateblock = impl_from_IDirect3DStateBlock9(iface); HRESULT hr; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = wined3d_stateblock_apply(This->wined3d_stateblock); + hr = wined3d_stateblock_apply(stateblock->wined3d_stateblock); wined3d_mutex_unlock(); return hr; } -static const IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl = +static const struct IDirect3DStateBlock9Vtbl d3d9_stateblock_vtbl = { /* IUnknown */ - IDirect3DStateBlock9Impl_QueryInterface, - IDirect3DStateBlock9Impl_AddRef, - IDirect3DStateBlock9Impl_Release, + d3d9_stateblock_QueryInterface, + d3d9_stateblock_AddRef, + d3d9_stateblock_Release, /* IDirect3DStateBlock9 */ - IDirect3DStateBlock9Impl_GetDevice, - IDirect3DStateBlock9Impl_Capture, - IDirect3DStateBlock9Impl_Apply + d3d9_stateblock_GetDevice, + d3d9_stateblock_Capture, + d3d9_stateblock_Apply, }; -HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, struct d3d9_device *device, +HRESULT stateblock_init(struct d3d9_stateblock *stateblock, struct d3d9_device *device, D3DSTATEBLOCKTYPE type, struct wined3d_stateblock *wined3d_stateblock) { HRESULT hr; - stateblock->IDirect3DStateBlock9_iface.lpVtbl = &Direct3DStateBlock9_Vtbl; - stateblock->ref = 1; + stateblock->IDirect3DStateBlock9_iface.lpVtbl = &d3d9_stateblock_vtbl; + stateblock->refcount = 1; if (wined3d_stateblock) { @@ -159,8 +158,8 @@ HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, struct d3d9_device } } - stateblock->parentDevice = &device->IDirect3DDevice9Ex_iface; - IDirect3DDevice9Ex_AddRef(stateblock->parentDevice); + stateblock->parent_device = &device->IDirect3DDevice9Ex_iface; + IDirect3DDevice9Ex_AddRef(stateblock->parent_device); return D3D_OK; }
1
0
0
0
Henri Verbeet : d3dx9: Use wine_dbgstr_rect() in some more places.
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: 176d27e88993d353fddf82312a31e95b5cbd5c96 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=176d27e88993d353fddf82312…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jun 1 17:22:50 2012 +0200 d3dx9: Use wine_dbgstr_rect() in some more places. --- dlls/d3dx9_36/font.c | 23 +++--- dlls/d3dx9_36/sprite.c | 7 +- dlls/d3dx9_36/surface.c | 214 ++++++++++++++++++++++------------------------- 3 files changed, 116 insertions(+), 128 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=176d27e88993d353fddf8…
1
0
0
0
Henri Verbeet : ddraw/tests: Split up test_coop_level_surf_create().
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: 34c9586b603df3a34bf40ff290c91e762a887897 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=34c9586b603df3a34bf40ff29…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jun 1 17:22:49 2012 +0200 ddraw/tests: Split up test_coop_level_surf_create(). --- dlls/ddraw/tests/d3d.c | 76 --------------------------------------------- dlls/ddraw/tests/ddraw1.c | 24 ++++++++++++++ dlls/ddraw/tests/ddraw2.c | 24 ++++++++++++++ dlls/ddraw/tests/ddraw4.c | 24 ++++++++++++++ dlls/ddraw/tests/ddraw7.c | 24 ++++++++++++++ 5 files changed, 96 insertions(+), 76 deletions(-) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index f0ec3cb..24700f6 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -3626,80 +3626,6 @@ static void z_format_test(void) ok(count, "Expected at least one supported Z Buffer format\n"); } -static void test_coop_level_surf_create(void) -{ - IDirectDrawSurface7 *surface7; - IDirectDrawSurface4 *surface4; - IDirectDrawSurface *surface1; - IDirectDraw7 *ddraw7; - IDirectDraw4 *ddraw4; - IDirectDraw2 *ddraw2; - IDirectDraw *ddraw1; - DDSURFACEDESC2 ddsd2; - DDSURFACEDESC ddsd; - HRESULT hr; - - /* IDirectDraw */ - if (FAILED(hr = DirectDrawCreate(NULL, &ddraw1, NULL))) - { - skip("Failed to create IDirectDraw object (%#x), skipping tests.\n", hr); - return; - } - - memset(&ddsd, 0, sizeof(ddsd)); - ddsd.dwSize = sizeof(ddsd); - ddsd.dwFlags = DDSD_CAPS; - ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hr = IDirectDraw_CreateSurface(ddraw1, &ddsd, &surface1, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); - - /* IDirectDraw2 */ - if (SUCCEEDED(IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw2))) - { - memset(&ddsd, 0, sizeof(ddsd)); - ddsd.dwSize = sizeof(ddsd); - ddsd.dwFlags = DDSD_CAPS; - ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hr = IDirectDraw2_CreateSurface(ddraw2, &ddsd, &surface1, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); - - IDirectDraw2_Release(ddraw2); - } - else skip("Failed to query IDirectDraw2 interface, skipping tests.\n"); - - /* IDirectDraw4 */ - if (SUCCEEDED(IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw4, (void **)&ddraw4))) - { - memset(&ddsd2, 0, sizeof(ddsd2)); - ddsd2.dwSize = sizeof(ddsd2); - ddsd2.dwFlags = DDSD_CAPS; - ddsd2.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hr = IDirectDraw4_CreateSurface(ddraw4, &ddsd2, &surface4, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); - - IDirectDraw4_Release(ddraw4); - } - else skip("Failed to query IDirectDraw4 interface, skipping tests.\n"); - - IDirectDraw_Release(ddraw1); - - /* IDirectDraw7 */ - if (FAILED(hr = pDirectDrawCreateEx(NULL, (void **)&ddraw7, &IID_IDirectDraw7, NULL))) - { - skip("Failed to create IDirectDraw7 object (%#x), skipping tests.\n", hr); - return; - } - - memset(&ddsd2, 0, sizeof(ddsd2)); - ddsd2.dwSize = sizeof(ddsd2); - ddsd2.dwFlags = DDSD_CAPS; - ddsd2.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hr = IDirectDraw7_CreateSurface(ddraw7, &ddsd2, &surface7, NULL); - ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); - - IDirectDraw7_Release(ddraw7); -} - static void test_get_caps1(void) { D3DDEVICEDESC hw_caps, hel_caps; @@ -4053,6 +3979,4 @@ START_TEST(d3d) test_get_caps1(); D3D1_releaseObjects(); } - - test_coop_level_surf_create(); } diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index a3b71c3..fb8b0be 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -2414,6 +2414,29 @@ static void test_initialize(void) } } +static void test_coop_level_surf_create(void) +{ + IDirectDrawSurface *surface; + IDirectDraw *ddraw; + DDSURFACEDESC ddsd; + HRESULT hr; + + if (!(ddraw = create_ddraw())) + { + skip("Failed to create a ddraw object, skipping test.\n"); + return; + } + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hr = IDirectDraw_CreateSurface(ddraw, &ddsd, &surface, NULL); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + + IDirectDraw_Release(ddraw); +} + START_TEST(ddraw1) { test_coop_level_create_device_window(); @@ -2432,4 +2455,5 @@ START_TEST(ddraw1) test_redundant_mode_set(); test_coop_level_mode_set(); test_initialize(); + test_coop_level_surf_create(); } diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 0b4e536..c6641ae 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -2533,6 +2533,29 @@ static void test_initialize(void) CoUninitialize(); } +static void test_coop_level_surf_create(void) +{ + IDirectDrawSurface *surface; + IDirectDraw2 *ddraw; + DDSURFACEDESC ddsd; + HRESULT hr; + + if (!(ddraw = create_ddraw())) + { + skip("Failed to create a ddraw object, skipping test.\n"); + return; + } + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hr = IDirectDraw2_CreateSurface(ddraw, &ddsd, &surface, NULL); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + + IDirectDraw2_Release(ddraw); +} + START_TEST(ddraw2) { test_coop_level_create_device_window(); @@ -2553,4 +2576,5 @@ START_TEST(ddraw2) test_redundant_mode_set(); test_coop_level_mode_set(); test_initialize(); + test_coop_level_surf_create(); } diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index f505653..0bf0eea 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -2648,6 +2648,29 @@ static void test_initialize(void) CoUninitialize(); } +static void test_coop_level_surf_create(void) +{ + IDirectDrawSurface4 *surface; + IDirectDraw4 *ddraw; + DDSURFACEDESC2 ddsd; + HRESULT hr; + + if (!(ddraw = create_ddraw())) + { + skip("Failed to create a ddraw object, skipping test.\n"); + return; + } + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hr = IDirectDraw4_CreateSurface(ddraw, &ddsd, &surface, NULL); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + + IDirectDraw4_Release(ddraw); +} + START_TEST(ddraw4) { test_process_vertices(); @@ -2669,4 +2692,5 @@ START_TEST(ddraw4) test_redundant_mode_set(); test_coop_level_mode_set(); test_initialize(); + test_coop_level_surf_create(); } diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 6faa46c..4152f6b 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -2457,6 +2457,29 @@ static void test_initialize(void) CoUninitialize(); } +static void test_coop_level_surf_create(void) +{ + IDirectDrawSurface7 *surface; + IDirectDraw7 *ddraw; + DDSURFACEDESC2 ddsd; + HRESULT hr; + + if (!(ddraw = create_ddraw())) + { + skip("Failed to create a ddraw object, skipping test.\n"); + return; + } + + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.dwFlags = DDSD_CAPS; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + hr = IDirectDraw7_CreateSurface(ddraw, &ddsd, &surface, NULL); + ok(hr == DDERR_NOCOOPERATIVELEVELSET, "Surface creation returned hr %#x.\n", hr); + + IDirectDraw7_Release(ddraw); +} + START_TEST(ddraw7) { HMODULE module = GetModuleHandleA("ddraw.dll"); @@ -2485,4 +2508,5 @@ START_TEST(ddraw7) test_redundant_mode_set(); test_coop_level_mode_set(); test_initialize(); + test_coop_level_surf_create(); }
1
0
0
0
Henri Verbeet : ddraw/tests: Split up test_initialize().
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: d61d842630d75c00611ce4d32cfdc2d77c14cc41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d61d842630d75c00611ce4d32…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jun 1 17:22:48 2012 +0200 ddraw/tests: Split up test_initialize(). --- dlls/ddraw/tests/d3d.c | 130 --------------------------------------------- dlls/ddraw/tests/ddraw1.c | 45 ++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 27 +++++++++ dlls/ddraw/tests/ddraw4.c | 27 +++++++++ dlls/ddraw/tests/ddraw7.c | 27 +++++++++ 5 files changed, 126 insertions(+), 130 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d61d842630d75c00611ce…
1
0
0
0
Henri Verbeet : ddraw/tests: Add test_coop_level_mode_set() for older ddraw versions.
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: 4f85b3772d87a2ec894fc78dbb56bbaebb704fc1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f85b3772d87a2ec894fc78db…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jun 1 17:22:47 2012 +0200 ddraw/tests: Add test_coop_level_mode_set() for older ddraw versions. --- dlls/ddraw/tests/ddraw1.c | 441 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 441 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw4.c | 432 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1314 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4f85b3772d87a2ec894fc…
1
0
0
0
Aric Stewart : usp10: Insert dotted circle (U+25CC) for invalid combining sequences in Arabic.
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: a2c1bd1ff51aad5c0169e47355cd5d995170d230 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2c1bd1ff51aad5c0169e4735…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri Jun 1 10:22:38 2012 -0500 usp10: Insert dotted circle (U+25CC) for invalid combining sequences in Arabic. --- dlls/usp10/shape.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 88 insertions(+), 0 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index d582fc7..84953fb 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -114,6 +114,8 @@ typedef struct tagConsonantComponents typedef void (*second_reorder_function)(LPWSTR pwChar, IndicSyllable *syllable,WORD* pwGlyphs, IndicSyllable* glyph_index, lexical_function lex); +typedef int (*combining_lexical_function)(WCHAR c); + /* the orders of joined_forms and contextual_features need to line up */ static const char* contextual_features[] = { @@ -784,6 +786,45 @@ static inline BOOL get_GSUB_Indic2(SCRIPT_ANALYSIS *psa, ScriptCache *psc) return(SUCCEEDED(hr)); } +static void insert_glyph(WORD *pwGlyphs, INT *pcGlyphs, INT cChars, INT write_dir, WORD glyph, INT index, WORD *pwLogClust) +{ + int i; + for (i = *pcGlyphs; i>=index; i--) + pwGlyphs[i+1] = pwGlyphs[i]; + pwGlyphs[index] = glyph; + *pcGlyphs = *pcGlyphs+1; + if (write_dir < 0) + UpdateClusters(index-3, 1, write_dir, cChars, pwLogClust); + else + UpdateClusters(index, 1, write_dir, cChars, pwLogClust); +} + +static void mark_invalid_combinations(HDC hdc, const WCHAR* pwcChars, INT cChars, WORD *pwGlyphs, INT *pcGlyphs, INT write_dir, WORD *pwLogClust, combining_lexical_function lex) +{ + CHAR *context_type; + int i,g; + WCHAR invalid = 0x25cc; + WORD invalid_glyph; + + context_type = HeapAlloc(GetProcessHeap(),0,cChars); + + /* Mark invalid combinations */ + for (i = 0; i < cChars; i++) + context_type[i] = lex(pwcChars[i]); + + GetGlyphIndicesW(hdc, &invalid, 1, &invalid_glyph, 0); + for (i = 1, g=1; i < cChars; i++, g++) + { + if (context_type[i] != 0 && context_type[i+write_dir]==context_type[i]) + { + insert_glyph(pwGlyphs, pcGlyphs, cChars, write_dir, invalid_glyph, g, pwLogClust); + g++; + } + } + + HeapFree(GetProcessHeap(),0,context_type); +} + static WCHAR neighbour_char(int i, int delta, const WCHAR* chars, INT cchLen) { if (i + delta < 0) @@ -839,6 +880,51 @@ static inline BOOL word_break_causing(WCHAR chr) return (chr == 0 || chr == 0x20 ); } +static int combining_lexical_Arabic(WCHAR c) +{ + enum {Arab_Norm = 0, Arab_DIAC1, Arab_DIAC2, Arab_DIAC3, Arab_DIAC4, Arab_DIAC5, Arab_DIAC6, Arab_DIAC7, Arab_DIAC8}; + + switch(c) + { + case 0x064B: + case 0x064C: + case 0x064E: + case 0x064F: + case 0x0652: + case 0x0657: + case 0x0658: + case 0x06E1: return Arab_DIAC1; break; + case 0x064D: + case 0x0650: + case 0x0656: return Arab_DIAC2; break; + case 0x0651: return Arab_DIAC3; break; + case 0x0610: + case 0x0611: + case 0x0612: + case 0x0613: + case 0x0614: + case 0x0659: + case 0x06D6: + case 0x06DC: + case 0x06DF: + case 0x06E0: + case 0x06E2: + case 0x06E4: + case 0x06E7: + case 0x06E8: + case 0x06EB: + case 0x06EC: return Arab_DIAC4; break; + case 0x06E3: + case 0x06EA: + case 0x06ED: return Arab_DIAC5; break; + case 0x0670: return Arab_DIAC6; break; + case 0x0653: return Arab_DIAC7; break; + case 0x0655: + case 0x0654: return Arab_DIAC8; break; + default: return Arab_Norm; + } +} + /* * ContextualShape_Arabic */ @@ -929,6 +1015,8 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p HeapFree(GetProcessHeap(),0,context_shape); HeapFree(GetProcessHeap(),0,context_type); + + mark_invalid_combinations(hdc, pwcChars, cChars, pwOutGlyphs, pcGlyphs, dirL, pwLogClust, combining_lexical_Arabic); } /*
1
0
0
0
Piotr Caban : msvcp90: Added partial basic_ostream<char> implementation.
by Alexandre Julliard
01 Jun '12
01 Jun '12
Module: wine Branch: master Commit: 3c980ffa01918304f6954013909794231c68ff1d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c980ffa01918304f69540139…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Jun 1 17:03:36 2012 +0200 msvcp90: Added partial basic_ostream<char> implementation. --- dlls/msvcp90/ios.c | 380 +++++++++++++++++++++++++++++++++------------ dlls/msvcp90/msvcp90.h | 1 + dlls/msvcp90/msvcp90.spec | 12 +- 3 files changed, 284 insertions(+), 109 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3c980ffa01918304f6954…
1
0
0
0
← Newer
1
...
78
79
80
81
82
83
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
Results per page:
10
25
50
100
200