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
January 2013
----- 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
736 discussions
Start a n
N
ew thread
Huw Davies : usp10: Fix MarkToBase offset for RTL text.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: 7ba38ad62e1d92f4b3db74ea2077add20547c07e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ba38ad62e1d92f4b3db74ea2…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jan 14 13:17:17 2013 +0000 usp10: Fix MarkToBase offset for RTL text. --- dlls/usp10/opentype.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index 1938892..f8cf8a1 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -1730,7 +1730,9 @@ static INT GPOS_apply_lookup(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, c if (desU.x || desU.y) { GPOS_convert_design_units_to_device(lpotm, lplogfont, desU.x, desU.y, &devX, &devY); - pGoffset[glyph_index].du += (round(devX) - piAdvance[glyph_index-1]); + if (!analysis->fRTL) pGoffset[glyph_index].du -= piAdvance[glyph_index-1]; + else if (analysis->fLogicalOrder) devX *= -1; + pGoffset[glyph_index].du += round(devX); pGoffset[glyph_index].dv += round(devY); } break;
1
0
0
0
Huw Davies : usp10: Propagate the script analysis to the GPOS lookup functions.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: b864b4aae24e745e03a144e089e750bccf89e2ec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b864b4aae24e745e03a144e08…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jan 14 13:17:16 2013 +0000 usp10: Propagate the script analysis to the GPOS lookup functions. --- dlls/usp10/opentype.c | 50 ++++++++++++++++++++++++++++-------------- dlls/usp10/shape.c | 13 +++------- dlls/usp10/usp10_internal.h | 3 +- 3 files changed, 39 insertions(+), 27 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b864b4aae24e745e03a14…
1
0
0
0
Huw Davies : usp10: Don't invert the y-offsets in RTL mode.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: a66efc263187851e9e88bc45b04afcf053290cb8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a66efc263187851e9e88bc45b…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jan 14 13:17:15 2013 +0000 usp10: Don't invert the y-offsets in RTL mode. --- dlls/usp10/usp10.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index b25e956..23ba4f5 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -3282,15 +3282,15 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN if (i == 0) { x += pGoffset[orig_index].du * dir; - y += pGoffset[orig_index].dv * dir; + y += pGoffset[orig_index].dv; } else { lpDx[(i - 1) * 2] += pGoffset[orig_index].du * dir; - lpDx[(i - 1) * 2 + 1] += pGoffset[orig_index].dv * dir; + lpDx[(i - 1) * 2 + 1] += pGoffset[orig_index].dv; } lpDx[i * 2] -= pGoffset[orig_index].du * dir; - lpDx[i * 2 + 1] -= pGoffset[orig_index].dv * dir; + lpDx[i * 2 + 1] -= pGoffset[orig_index].dv; } }
1
0
0
0
Jacek Caban : atl100: Added AtlComModuleUnregisterServer implementation.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: ca5ded28734fad465bd9a435e2544ce395fbf0a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca5ded28734fad465bd9a435e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 14 13:03:13 2013 +0100 atl100: Added AtlComModuleUnregisterServer implementation. --- dlls/atl100/atl.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/atl100/atl100.spec | 2 +- dlls/atl80/atl80.spec | 2 +- include/atlbase.h | 1 + 4 files changed, 53 insertions(+), 2 deletions(-) diff --git a/dlls/atl100/atl.c b/dlls/atl100/atl.c index 099513a..28b8cbc 100644 --- a/dlls/atl100/atl.c +++ b/dlls/atl100/atl.c @@ -454,6 +454,56 @@ HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE *pm, REFCLSID rclsid, } /*********************************************************************** + * AtlComModuleUnregisterServer [atl100.22] + */ +HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib, const CLSID *clsid) +{ + const struct _ATL_CATMAP_ENTRY *catmap; + _ATL_OBJMAP_ENTRY **iter; + HRESULT hres; + + TRACE("(%p %x %s)\n", mod, bRegTypeLib, debugstr_guid(clsid)); + + for(iter = mod->m_ppAutoObjMapFirst; iter < mod->m_ppAutoObjMapLast; iter++) { + if(!*iter || (clsid && !IsEqualCLSID((*iter)->pclsid, clsid))) + continue; + + TRACE("Unregistering clsid %s\n", debugstr_guid((*iter)->pclsid)); + + catmap = (*iter)->pfnGetCategoryMap(); + if(catmap) { + hres = AtlRegisterClassCategoriesHelper((*iter)->pclsid, catmap, FALSE); + if(FAILED(hres)) + return hres; + } + + hres = (*iter)->pfnUpdateRegistry(FALSE); + if(FAILED(hres)) + return hres; + } + + if(bRegTypeLib) { + ITypeLib *typelib; + TLIBATTR *attr; + BSTR path; + + hres = AtlLoadTypeLib(mod->m_hInstTypeLib, NULL, &path, &typelib); + if(FAILED(hres)) + return hres; + + SysFreeString(path); + hres = ITypeLib_GetLibAttr(typelib, &attr); + if(SUCCEEDED(hres)) + hres = UnRegisterTypeLib(&attr->guid, attr->wMajorVerNum, attr->wMinorVerNum, attr->lcid, attr->syskind); + ITypeLib_Release(typelib); + if(FAILED(hres)) + return hres; + } + + return S_OK; +} + +/*********************************************************************** * AtlRegisterClassCategoriesHelper [atl100.49] */ HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _ATL_CATMAP_ENTRY *catmap, BOOL reg) diff --git a/dlls/atl100/atl100.spec b/dlls/atl100/atl100.spec index b30b839..1eae2ed 100644 --- a/dlls/atl100/atl100.spec +++ b/dlls/atl100/atl100.spec @@ -6,7 +6,7 @@ 15 stdcall AtlComModuleGetClassObject(ptr ptr ptr ptr) 17 stub AtlComModuleRegisterClassObjects 20 stub AtlComModuleRevokeClassObjects -22 stub AtlComModuleUnregisterServer +22 stdcall AtlComModuleUnregisterServer(ptr long ptr) 23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr) 24 stdcall AtlWaitWithMessageLoop(long) 25 stub AtlSetErrorInfo diff --git a/dlls/atl80/atl80.spec b/dlls/atl80/atl80.spec index 7719257..bf36bbc 100644 --- a/dlls/atl80/atl80.spec +++ b/dlls/atl80/atl80.spec @@ -8,7 +8,7 @@ 18 stdcall AtlComModuleRegisterServer(ptr long ptr) 19 stdcall AtlRegisterTypeLib(ptr wstr) 20 stub AtlComModuleRevokeClassObjects -22 stub AtlComModuleUnregisterServer +22 stdcall AtlComModuleUnregisterServer(ptr long ptr) atl100.AtlComModuleUnregisterServer 23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr) atl100.AtlUpdateRegistryFromResourceD 24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop 25 stub AtlSetErrorInfo diff --git a/include/atlbase.h b/include/atlbase.h index d0dd96c..84a22b4 100644 --- a/include/atlbase.h +++ b/include/atlbase.h @@ -255,6 +255,7 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**); HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE,LPCOLESTR); HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMAP_ENTRY*,BOOL); HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE*,REFCLSID,REFIID,void**); +HRESULT WINAPI AtlComModuleUnregisterServer(_ATL_COM_MODULE*,BOOL,const CLSID*); BOOL WINAPI AtlWaitWithMessageLoop(HANDLE); #endif /* __WINE_ATLBASE_H__ */
1
0
0
0
Stefan Dösinger : d3d8: Return D3D_OK from the palette setters.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: d70ab45fc5e3d607b304237803e428e86eadafd5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d70ab45fc5e3d607b30423780…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Jan 14 11:56:54 2013 +0100 d3d8: Return D3D_OK from the palette setters. --- dlls/d3d8/device.c | 8 +++--- dlls/d3d8/tests/device.c | 66 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 5 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 7a13344..e92be20 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1839,12 +1839,12 @@ static HRESULT WINAPI d3d8_device_GetInfo(IDirect3DDevice8 *iface, static HRESULT WINAPI d3d8_device_SetPaletteEntries(IDirect3DDevice8 *iface, UINT palette_idx, const PALETTEENTRY *entries) { - FIXME("iface %p, palette_idx %u, entries %p unimplemented\n", iface, palette_idx, entries); + WARN("iface %p, palette_idx %u, entries %p unimplemented\n", iface, palette_idx, entries); /* GPUs stopped supporting palettized textures with the Shader Model 1 generation. Wined3d * does not have a d3d8/9-style palette API */ - return D3DERR_INVALIDCALL; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetPaletteEntries(IDirect3DDevice8 *iface, @@ -1857,9 +1857,9 @@ static HRESULT WINAPI d3d8_device_GetPaletteEntries(IDirect3DDevice8 *iface, static HRESULT WINAPI d3d8_device_SetCurrentTexturePalette(IDirect3DDevice8 *iface, UINT palette_idx) { - FIXME("iface %p, palette_idx %u unimplemented.\n", iface, palette_idx); + WARN("iface %p, palette_idx %u unimplemented.\n", iface, palette_idx); - return D3DERR_INVALIDCALL; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetCurrentTexturePalette(IDirect3DDevice8 *iface, UINT *palette_idx) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 2c8cbbf..17c3443 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -3,7 +3,7 @@ * Copyright (C) 2006 Chris Robinson * Copyright (C) 2006 Louis Lenders * Copyright 2006-2007 Henri Verbeet - * Copyright 2010, 2011 Stefan Dösinger for CodeWeavers + * Copyright 2006-2007, 2011-2013 Stefan Dösinger for CodeWeavers * Copyright 2013 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -4469,6 +4469,69 @@ static void test_surface_lockrect_blocks(void) DestroyWindow(window); } +static void test_set_palette(void) +{ + IDirect3DDevice8 *device; + IDirect3D8 *d3d8; + UINT refcount; + HWND window; + HRESULT hr; + PALETTEENTRY pal[256]; + unsigned int i; + D3DCAPS8 caps; + + if (!(d3d8 = pDirect3DCreate8(D3D_SDK_VERSION))) + { + skip("Failed to create d3d8 object, skipping tests.\n"); + return; + } + + window = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, + 0, 0, 640, 480, 0, 0, 0, 0); + if (!(device = create_device(d3d8, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + IDirect3D8_Release(d3d8); + DestroyWindow(window); + return; + } + + for (i = 0; i < sizeof(pal) / sizeof(*pal); i++) + { + pal[i].peRed = i; + pal[i].peGreen = i; + pal[i].peBlue = i; + pal[i].peFlags = 0xff; + } + hr = IDirect3DDevice8_SetPaletteEntries(device, 0, pal); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + + hr = IDirect3DDevice8_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + for (i = 0; i < sizeof(pal) / sizeof(*pal); i++) + { + pal[i].peRed = i; + pal[i].peGreen = i; + pal[i].peBlue = i; + pal[i].peFlags = i; + } + if (caps.TextureCaps & D3DPTEXTURECAPS_ALPHAPALETTE) + { + hr = IDirect3DDevice8_SetPaletteEntries(device, 0, pal); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + } + else + { + hr = IDirect3DDevice8_SetPaletteEntries(device, 0, pal); + ok(hr == D3DERR_INVALIDCALL, "SetPaletteEntries returned %#x, expected D3DERR_INVALIDCALL.\n", hr); + } + + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + IDirect3D8_Release(d3d8); + DestroyWindow(window); +} + START_TEST(device) { HMODULE d3d8_handle = LoadLibraryA( "d3d8.dll" ); @@ -4542,6 +4605,7 @@ START_TEST(device) test_surface_format_null(); test_surface_double_unlock(); test_surface_lockrect_blocks(); + test_set_palette(); } UnregisterClassA("d3d8_test_wc", GetModuleHandleA(NULL)); }
1
0
0
0
Stefan Dösinger : d3d9: Return D3D_OK from the palette setters.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: c57511ce4adede3a248ae89fc8ea6fd7257b92f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c57511ce4adede3a248ae89fc…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Jan 14 11:56:53 2013 +0100 d3d9: Return D3D_OK from the palette setters. --- dlls/d3d9/device.c | 13 ++++++--- dlls/d3d9/tests/device.c | 65 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 73 insertions(+), 5 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index d79ad62..67f9906 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1832,9 +1832,14 @@ static HRESULT WINAPI d3d9_device_ValidateDevice(IDirect3DDevice9Ex *iface, DWOR static HRESULT WINAPI d3d9_device_SetPaletteEntries(IDirect3DDevice9Ex *iface, UINT palette_idx, const PALETTEENTRY *entries) { - FIXME("iface %p, palette_idx %u, entries %p unimplemented.\n", iface, palette_idx, entries); + WARN("iface %p, palette_idx %u, entries %p unimplemented.\n", iface, palette_idx, entries); - return D3DERR_INVALIDCALL; + /* The d3d9 palette API is non-functional on Windows. Getters and setters are implemented, + * and some drivers allow the creation of P8 surfaces. These surfaces can be copied to + * other P8 surfaces with StretchRect, but cannot be converted to (A)RGB. + * + * Some older(dx7) cards may have support for P8 textures, but games cannot rely on this. */ + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetPaletteEntries(IDirect3DDevice9Ex *iface, @@ -1847,9 +1852,9 @@ static HRESULT WINAPI d3d9_device_GetPaletteEntries(IDirect3DDevice9Ex *iface, static HRESULT WINAPI d3d9_device_SetCurrentTexturePalette(IDirect3DDevice9Ex *iface, UINT palette_idx) { - FIXME("iface %p, palette_idx %u unimplemented.\n", iface, palette_idx); + WARN("iface %p, palette_idx %u unimplemented.\n", iface, palette_idx); - return D3DERR_INVALIDCALL; + return D3D_OK; } static HRESULT WINAPI d3d9_device_GetCurrentTexturePalette(IDirect3DDevice9Ex *iface, UINT *palette_idx) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index c81047a..7e7fe40 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2006 Vitaliy Margolen * Copyright (C) 2006 Chris Robinson - * Copyright 2006-2007, 2010, 2011 Stefan Dösinger for CodeWeavers + * Copyright 2006-2008, 2010-2011, 2013 Stefan Dösinger for CodeWeavers * Copyright 2005, 2006, 2007 Henri Verbeet * Copyright 2013 Henri Verbeet for CodeWeavers * Copyright (C) 2008 Rico Schüller @@ -5968,6 +5968,68 @@ static void test_surface_lockrect_blocks(void) DestroyWindow(window); } +static void test_set_palette(void) +{ + IDirect3DDevice9 *device; + IDirect3D9 *d3d9; + UINT refcount; + HWND window; + HRESULT hr; + PALETTEENTRY pal[256]; + unsigned int i; + D3DCAPS9 caps; + + if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) + { + skip("Failed to create IDirect3D9 object, skipping tests.\n"); + return; + } + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW, + 0, 0, 640, 480, 0, 0, 0, 0); + if (!(device = create_device(d3d9, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + DestroyWindow(window); + return; + } + + for (i = 0; i < sizeof(pal) / sizeof(*pal); i++) + { + pal[i].peRed = i; + pal[i].peGreen = i; + pal[i].peBlue = i; + pal[i].peFlags = 0xff; + } + hr = IDirect3DDevice9_SetPaletteEntries(device, 0, pal); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + for (i = 0; i < sizeof(pal) / sizeof(*pal); i++) + { + pal[i].peRed = i; + pal[i].peGreen = i; + pal[i].peBlue = i; + pal[i].peFlags = i; + } + if (caps.TextureCaps & D3DPTEXTURECAPS_ALPHAPALETTE) + { + hr = IDirect3DDevice9_SetPaletteEntries(device, 0, pal); + ok(SUCCEEDED(hr), "Failed to set palette entries, hr %#x.\n", hr); + } + else + { + hr = IDirect3DDevice9_SetPaletteEntries(device, 0, pal); + ok(hr == D3DERR_INVALIDCALL, "SetPaletteEntries returned %#x, expected D3DERR_INVALIDCALL.\n", hr); + } + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + IDirect3D9_Release(d3d9); + DestroyWindow(window); +} + START_TEST(device) { HMODULE d3d9_handle = LoadLibraryA( "d3d9.dll" ); @@ -6053,6 +6115,7 @@ START_TEST(device) test_surface_format_null(); test_surface_double_unlock(); test_surface_lockrect_blocks(); + test_set_palette(); } out:
1
0
0
0
Alexandre Julliard : gdi32: Add ref counting to the face and family objects .
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: 865078b05a2216522aef5db5f9232f24de5d98fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=865078b05a2216522aef5db5f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 14 15:19:14 2013 +0100 gdi32: Add ref counting to the face and family objects. --- dlls/gdi32/freetype.c | 81 +++++++++++++++++++++++++++++------------------- 1 files changed, 49 insertions(+), 32 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index ab9a1af..0798414 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -259,6 +259,7 @@ struct enum_data typedef struct tagFace { struct list entry; + unsigned int refcount; WCHAR *StyleName; WCHAR *FullName; WCHAR *file; @@ -280,6 +281,7 @@ typedef struct tagFace { typedef struct tagFamily { struct list entry; + unsigned int refcount; WCHAR *FamilyName; WCHAR *EnglishName; struct list faces; @@ -966,7 +968,9 @@ static Face *find_face_from_filename(const WCHAR *file_name, const WCHAR *face_n file = face->file; else file++; - if(!strcmpiW(file, file_name)) return face; + if(strcmpiW(file, file_name)) continue; + face->refcount++; + return face; } } return NULL; @@ -1233,27 +1237,29 @@ static inline BOOL faces_equal( const Face *f1, const Face *f2 ) return !memcmp( &f1->fs, &f2->fs, sizeof(f1->fs) ); } -static inline void free_face( Face *face ) +static void release_family( Family *family ) { - HeapFree( GetProcessHeap(), 0, face->file ); - HeapFree( GetProcessHeap(), 0, face->StyleName ); - HeapFree( GetProcessHeap(), 0, face->FullName ); - HeapFree( GetProcessHeap(), 0, face->cached_enum_data ); - HeapFree( GetProcessHeap(), 0, face ); + if (--family->refcount) return; + assert( list_empty( &family->faces )); + list_remove( &family->entry ); + HeapFree( GetProcessHeap(), 0, family->FamilyName ); + HeapFree( GetProcessHeap(), 0, family->EnglishName ); + HeapFree( GetProcessHeap(), 0, family ); } -static inline void free_family( Family *family ) +static void release_face( Face *face ) { - Face *face, *cursor2; - - LIST_FOR_EACH_ENTRY_SAFE( face, cursor2, &family->faces, Face, entry ) + if (--face->refcount) return; + if (face->family) { list_remove( &face->entry ); - free_face( face ); + release_family( face->family ); } - HeapFree( GetProcessHeap(), 0, family->FamilyName ); - HeapFree( GetProcessHeap(), 0, family->EnglishName ); - HeapFree( GetProcessHeap(), 0, family ); + HeapFree( GetProcessHeap(), 0, face->file ); + HeapFree( GetProcessHeap(), 0, face->StyleName ); + HeapFree( GetProcessHeap(), 0, face->FullName ); + HeapFree( GetProcessHeap(), 0, face->cached_enum_data ); + HeapFree( GetProcessHeap(), 0, face ); } static inline int style_order(const Face *face) @@ -1301,8 +1307,9 @@ static BOOL insert_face_in_family_list( Face *face, Family *family ) debugstr_w(cursor->file), debugstr_w(face->file)); list_add_before( &cursor->entry, &face->entry ); face->family = family; - list_remove( &cursor->entry); - free_face( cursor ); + family->refcount++; + face->refcount++; + release_face( cursor ); return TRUE; } } @@ -1314,6 +1321,8 @@ static BOOL insert_face_in_family_list( Face *face, Family *family ) list_add_before( &cursor->entry, &face->entry ); face->family = family; + family->refcount++; + face->refcount++; return TRUE; } @@ -1324,10 +1333,12 @@ static BOOL insert_face_in_family_list( Face *face, Family *family ) static Family *create_family( WCHAR *name, WCHAR *english_name ) { Family * const family = HeapAlloc( GetProcessHeap(), 0, sizeof(*family) ); + family->refcount = 1; family->FamilyName = name; family->EnglishName = english_name; list_init( &family->faces ); family->replacement = &family->faces; + list_add_tail( &font_list, &family->entry ); return family; } @@ -1363,7 +1374,9 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family, void *bu Face *face; face = HeapAlloc(GetProcessHeap(), 0, sizeof(*face)); face->cached_enum_data = NULL; + face->family = NULL; + face->refcount = 1; face->file = strdupW( buffer ); face->StyleName = strdupW(face_name); @@ -1406,9 +1419,10 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family, void *bu face->fs.fsUsb[0], face->fs.fsUsb[1], face->fs.fsUsb[2], face->fs.fsUsb[3]); - insert_face_in_family_list(face, family); + if (insert_face_in_family_list(face, family)) + TRACE("Added font %s %s\n", debugstr_w(family->FamilyName), debugstr_w(face->StyleName)); - TRACE("Added font %s %s\n", debugstr_w(family->FamilyName), debugstr_w(face->StyleName)); + release_face( face ); } /* load bitmap strikes */ @@ -1446,7 +1460,6 @@ static void load_font_list_from_cache(HKEY hkey_font_cache) english_family = strdupW( buffer ); family = create_family(family_name, english_family); - list_add_tail(&font_list, &family->entry); if(english_family) { @@ -1473,6 +1486,7 @@ static void load_font_list_from_cache(HKEY hkey_font_cache) size = sizeof(buffer); } RegCloseKey(hkey_family); + release_family( family ); size = sizeof(buffer); } } @@ -1601,8 +1615,6 @@ static Family *get_family( FT_Face ft_face, BOOL vertical ) if (!family) { family = create_family( name, english_name ); - list_add_tail( &font_list, &family->entry ); - if (english_name) { FontSubst *subst = HeapAlloc( GetProcessHeap(), 0, sizeof(*subst) ); @@ -1617,6 +1629,7 @@ static Family *get_family( FT_Face ft_face, BOOL vertical ) { HeapFree( GetProcessHeap(), 0, name ); HeapFree( GetProcessHeap(), 0, english_name ); + family->refcount++; } return family; @@ -1733,6 +1746,7 @@ static Face *create_face( FT_Face ft_face, FT_Long face_index, const char *file, Face *face = HeapAlloc( GetProcessHeap(), 0, sizeof(*face) ); My_FT_Bitmap_Size *size = (My_FT_Bitmap_Size *)ft_face->available_sizes; + face->refcount = 1; face->StyleName = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, GetSystemDefaultLangID() ); if (!face->StyleName) face->StyleName = get_face_name( ft_face, TT_NAME_ID_FONT_SUBFAMILY, TT_MS_LANGID_ENGLISH_UNITED_STATES ); @@ -1806,17 +1820,16 @@ static void AddFaceToList(FT_Face ft_face, const char *file, void *font_data_ptr face = create_face( ft_face, face_index, file, font_data_ptr, font_data_size, flags, vertical, aa_flags ); family = get_family( ft_face, vertical ); - if (!insert_face_in_family_list( face, family )) + if (insert_face_in_family_list( face, family )) { - free_face( face ); - return; - } - - if (flags & ADDFONT_ADD_TO_CACHE) - add_face_to_cache( face ); + if (flags & ADDFONT_ADD_TO_CACHE) + add_face_to_cache( face ); - TRACE("Added font %s %s\n", debugstr_w(family->FamilyName), - debugstr_w(face->StyleName)); + TRACE("Added font %s %s\n", debugstr_w(family->FamilyName), + debugstr_w(face->StyleName)); + } + release_face( face ); + release_family( family ); } static FT_Face new_ft_face( const char *file, void *font_data_ptr, DWORD font_data_size, @@ -2323,6 +2336,7 @@ skip_internal: new_child = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_child)); new_child->face = font_link_entry->face; new_child->font = NULL; + new_child->face->refcount++; system_font_link->fs.fsCsb[0] |= font_link_entry->face->fs.fsCsb[0]; system_font_link->fs.fsCsb[1] |= font_link_entry->face->fs.fsCsb[1]; list_add_tail(&system_font_link->links, &new_child->entry); @@ -3001,7 +3015,7 @@ static BOOL get_fontdir( const char *unix_name, struct fontdir *fd ) pFT_Done_Face( ft_face ); GetEnumStructs( face, name, &elf, &ntm, &type ); - free_face( face ); + release_face( face ); HeapFree( GetProcessHeap(), 0, name ); HeapFree( GetProcessHeap(), 0, english_name ); @@ -4042,6 +4056,7 @@ static void free_font(GdiFont *font) list_remove(&child->entry); if(child->font) free_font(child->font); + release_face( child->face ); HeapFree(GetProcessHeap(), 0, child); } @@ -4354,6 +4369,7 @@ static BOOL create_child_font_list(GdiFont *font) new_child = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_child)); new_child->face = font_link_entry->face; new_child->font = NULL; + new_child->face->refcount++; list_add_tail(&font->child_fonts, &new_child->entry); TRACE("font %s %ld\n", debugstr_w(new_child->face->file), new_child->face->face_index); } @@ -4376,6 +4392,7 @@ static BOOL create_child_font_list(GdiFont *font) new_child = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_child)); new_child->face = font_link_entry->face; new_child->font = NULL; + new_child->face->refcount++; list_add_tail(&font->child_fonts, &new_child->entry); TRACE("font %s %ld\n", debugstr_w(new_child->face->file), new_child->face->face_index); }
1
0
0
0
Alexandre Julliard : gdi32: Avoid creating a family object just to retrieve the font data.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: 634840579c378f87cbf33c0022138e7b7b5967d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=634840579c378f87cbf33c002…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 14 14:45:40 2013 +0100 gdi32: Avoid creating a family object just to retrieve the font data. --- dlls/gdi32/freetype.c | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 9b6a909..ab9a1af 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -2983,14 +2983,13 @@ struct fontdir #include <poppack.h> -static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, +static void GetEnumStructs(Face *face, const WCHAR *family_name, LPENUMLOGFONTEXW pelf, NEWTEXTMETRICEXW *pntm, LPDWORD ptype); static BOOL get_fontdir( const char *unix_name, struct fontdir *fd ) { FT_Face ft_face = new_ft_face( unix_name, NULL, 0, 0, FALSE ); Face *face; - Family *family; WCHAR *name, *english_name; ENUMLOGFONTEXW elf; NEWTEXTMETRICEXW ntm; @@ -2999,12 +2998,12 @@ static BOOL get_fontdir( const char *unix_name, struct fontdir *fd ) if (!ft_face) return FALSE; face = create_face( ft_face, 0, unix_name, NULL, 0, 0, FALSE, 0 ); get_family_names( ft_face, &name, &english_name, FALSE ); - family = create_family( name, english_name ); - insert_face_in_family_list( face, family ); pFT_Done_Face( ft_face ); - GetEnumStructs( face, &elf, &ntm, &type ); - free_family( family ); + GetEnumStructs( face, name, &elf, &ntm, &type ); + free_face( face ); + HeapFree( GetProcessHeap(), 0, name ); + HeapFree( GetProcessHeap(), 0, english_name ); if ((type & TRUETYPE_FONTTYPE) == 0) return FALSE; @@ -5091,7 +5090,7 @@ static DWORD create_enum_charset_list(DWORD charset, struct enum_charset_list *l return n; } -static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, +static void GetEnumStructs(Face *face, const WCHAR *family_name, LPENUMLOGFONTEXW pelf, NEWTEXTMETRICEXW *pntm, LPDWORD ptype) { GdiFont *font; @@ -5123,7 +5122,7 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, return; } - font->name = strdupW(face->family->FamilyName); + font->name = strdupW( family_name ); font->ntmFlags = face->ntmFlags; if (get_outline_text_metrics(font)) @@ -5152,11 +5151,11 @@ static void GetEnumStructs(Face *face, LPENUMLOGFONTEXW pelf, pntm->ntmTm.ntmCellHeight = pntm->ntmTm.tmHeight; pntm->ntmTm.ntmAvgWidth = pntm->ntmTm.tmAveCharWidth; - lstrcpynW(pelf->elfLogFont.lfFaceName, face->family->FamilyName, LF_FACESIZE); + lstrcpynW(pelf->elfLogFont.lfFaceName, family_name, LF_FACESIZE); if (face->FullName) lstrcpynW(pelf->elfFullName, face->FullName, LF_FULLFACESIZE); else - lstrcpynW(pelf->elfFullName, face->family->FamilyName, LF_FULLFACESIZE); + lstrcpynW(pelf->elfFullName, family_name, LF_FULLFACESIZE); lstrcpynW(pelf->elfStyle, face->StyleName, LF_FACESIZE); } @@ -5227,7 +5226,7 @@ static BOOL enum_face_charsets(const Family *family, Face *face, struct enum_cha DWORD type = 0; int i; - GetEnumStructs(face, &elf, &ntm, &type); + GetEnumStructs(face, face->family->FamilyName, &elf, &ntm, &type); for(i = 0; i < list->total; i++) { if(!face->scalable && face->fs.fsCsb[0] == 0) { /* OEM bitmap */ elf.elfLogFont.lfCharSet = ntm.ntmTm.tmCharSet = OEM_CHARSET;
1
0
0
0
Alexandre Julliard : msvcrt: Fix incorrect use of the system wctomb function.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: afee133b65682108195ada323ad8c7f3cb68654f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=afee133b65682108195ada323…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 14 13:47:00 2013 +0100 msvcrt: Fix incorrect use of the system wctomb function. --- dlls/msvcrt/file.c | 2 +- dlls/msvcrt/msvcrt.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index f0d0f7d..dedfa30 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -3390,7 +3390,7 @@ MSVCRT_wint_t CDECL MSVCRT_fputwc(MSVCRT_wint_t wc, MSVCRT_FILE* file) char buf[MSVCRT_MB_LEN_MAX]; int char_len; - char_len = wctomb(buf, mwc); + char_len = MSVCRT_wctomb(buf, mwc); if(char_len!=-1 && MSVCRT_fwrite(buf, char_len, 1, file)==1) ret = wc; else diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 77418e3..9b88d32 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -945,6 +945,7 @@ int* __cdecl __p___mb_cur_max(void); unsigned int* __cdecl __p__fmode(void); MSVCRT_wchar_t* __cdecl MSVCRT__wcsdup(const MSVCRT_wchar_t*); MSVCRT_wchar_t*** __cdecl MSVCRT___p__wenviron(void); +INT __cdecl MSVCRT_wctomb(char*,MSVCRT_wchar_t); char* __cdecl MSVCRT__strdate(char* date); char* __cdecl MSVCRT__strtime(char* date); int __cdecl _setmbcp(int);
1
0
0
0
Damjan Jovanovic : qcap: Use libv4l1.h when available, instead of linux/ videodev.h which is deprecated/obsolete.
by Alexandre Julliard
14 Jan '13
14 Jan '13
Module: wine Branch: master Commit: 8d4f636d543362ef901e2233cc9f9149f5f14bb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d4f636d543362ef901e2233c…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Sun Jan 13 21:06:14 2013 +0200 qcap: Use libv4l1.h when available, instead of linux/videodev.h which is deprecated/obsolete. --- configure | 2 +- configure.ac | 2 +- dlls/qcap/v4l.c | 8 +++++--- dlls/qcap/yuv.c | 2 +- include/config.h.in | 3 +++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 8394dea..04b3dc3 100755 --- a/configure +++ b/configure @@ -6251,7 +6251,7 @@ fi done -for ac_header in linux/videodev.h linux/videodev2.h +for ac_header in linux/videodev.h linux/videodev2.h libv4l1.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TIME_H diff --git a/configure.ac b/configure.ac index 78d4f4b..fd760cf 100644 --- a/configure.ac +++ b/configure.ac @@ -667,7 +667,7 @@ AC_CHECK_HEADERS([pthread_np.h],,, #include <pthread.h> #endif]) -AC_CHECK_HEADERS([linux/videodev.h linux/videodev2.h],,, +AC_CHECK_HEADERS([linux/videodev.h linux/videodev2.h libv4l1.h],,, [#ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 1851ba4..f5baaeb 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -45,7 +45,9 @@ #ifdef HAVE_ASM_TYPES_H #include <asm/types.h> #endif -#ifdef HAVE_LINUX_VIDEODEV_H +#ifdef HAVE_LIBV4L1_H +#include <libv4l1.h> +#elif defined(HAVE_LINUX_VIDEODEV_H) #include <linux/videodev.h> #endif #ifdef HAVE_UNISTD_H @@ -68,7 +70,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap_v4l); -#ifdef HAVE_LINUX_VIDEODEV_H +#if defined(HAVE_LINUX_VIDEODEV_H) || defined(HAVE_LIBV4L1_H) static typeof(open) *video_open = open; static typeof(close) *video_close = close; @@ -994,4 +996,4 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) FAIL_WITH_ERR; } -#endif /* HAVE_LINUX_VIDEODEV_H */ +#endif /* HAVE_LINUX_VIDEODEV_H || HAVE_LINUX_LIBV4L1_H */ diff --git a/dlls/qcap/yuv.c b/dlls/qcap/yuv.c index 608e571..6b8ff29 100644 --- a/dlls/qcap/yuv.c +++ b/dlls/qcap/yuv.c @@ -32,7 +32,7 @@ #include "wine/debug.h" /* This is not used if V4L support is missing */ -#ifdef HAVE_LINUX_VIDEODEV_H +#if defined(HAVE_LINUX_VIDEODEV_H) || defined(HAVE_LIBV4L1_H) WINE_DEFAULT_DEBUG_CHANNEL(qcap); diff --git a/include/config.h.in b/include/config.h.in index b8acb15..9a7d109 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -347,6 +347,9 @@ /* Define to 1 if you have the `ossaudio' library (-lossaudio). */ #undef HAVE_LIBOSSAUDIO +/* Define to 1 if you have the <libv4l1.h> header file. */ +#undef HAVE_LIBV4L1_H + /* Define if you have the libxml2 library */ #undef HAVE_LIBXML2
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
74
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
Results per page:
10
25
50
100
200