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 2014
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
814 discussions
Start a n
N
ew thread
Frédéric Delanoy : gdi32: Use BOOL type where appropriate.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: e7594272feedd3125e8331631d53e72c20d8a6a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7594272feedd3125e8331631…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Sat Jan 4 15:48:21 2014 +0100 gdi32: Use BOOL type where appropriate. --- dlls/gdi32/region.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c index 062272d..2632de5 100644 --- a/dlls/gdi32/region.c +++ b/dlls/gdi32/region.c @@ -2523,7 +2523,7 @@ static void REGION_loadAET( struct list *AET, struct list *ETEs ) static void REGION_computeWAET( struct list *AET, struct list *WETE ) { struct edge_table_entry *active; - int inside = 1; + BOOL inside = TRUE; int isInside = 0; list_init( WETE );
1
0
0
0
André Hentschel : ntdll: Add signal definitions for GNU/Hurd.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: 5865fe78de685e2a5c7e05fa22449382884758dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5865fe78de685e2a5c7e05fa2…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Jan 6 02:32:43 2014 +0100 ntdll: Add signal definitions for GNU/Hurd. Partially based on a patch by Andrew Nguyen. --- dlls/ntdll/signal_i386.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index fe6d517..63bf088 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -434,6 +434,33 @@ typedef ucontext_t SIGCONTEXT; #define T_MCHK T_MCA #define T_XMMFLT T_XMM +#elif defined(__GNU__) +typedef ucontext_t SIGCONTEXT; + +#define EAX_sig(context) ((context)->uc_mcontext.gregs[REG_EAX]) +#define EBX_sig(context) ((context)->uc_mcontext.gregs[REG_EBX]) +#define ECX_sig(context) ((context)->uc_mcontext.gregs[REG_ECX]) +#define EDX_sig(context) ((context)->uc_mcontext.gregs[REG_EDX]) +#define ESI_sig(context) ((context)->uc_mcontext.gregs[REG_ESI]) +#define EDI_sig(context) ((context)->uc_mcontext.gregs[REG_EDI]) +#define EBP_sig(context) ((context)->uc_mcontext.gregs[REG_EBP]) +#define ESP_sig(context) ((context)->uc_mcontext.gregs[REG_ESP]) + +#define CS_sig(context) ((context)->uc_mcontext.gregs[REG_CS]) +#define DS_sig(context) ((context)->uc_mcontext.gregs[REG_DS]) +#define ES_sig(context) ((context)->uc_mcontext.gregs[REG_ES]) +#define SS_sig(context) ((context)->uc_mcontext.gregs[REG_SS]) +#define FS_sig(context) ((context)->uc_mcontext.gregs[REG_FS]) +#define GS_sig(context) ((context)->uc_mcontext.gregs[REG_GS]) + +#define EFL_sig(context) ((context)->uc_mcontext.gregs[REG_EFL]) +#define EIP_sig(context) ((context)->uc_mcontext.gregs[REG_EIP]) +#define TRAP_sig(context) ((context)->uc_mcontext.gregs[REG_TRAPNO]) +#define ERROR_sig(context) ((context)->uc_mcontext.gregs[REG_ERR]) + +#define FPU_sig(context) ((FLOATING_SAVE_AREA *)&(context)->uc_mcontext.fpregs.fp_reg_set.fpchip_state) +#define FPUX_sig(context) NULL + #else #error You must define the signal context functions for your platform #endif /* linux */
1
0
0
0
André Hentschel : libwine: Added LDT support for GNU/ Hurd.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: 02e6f7d146a35b5a86655c1c1e562f458bfbb74c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02e6f7d146a35b5a86655c1c1…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Jan 6 02:31:08 2014 +0100 libwine: Added LDT support for GNU/Hurd. Based on a patch by Andrew Nguyen. --- libs/wine/ldt.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c index 5175e9c..0946407 100644 --- a/libs/wine/ldt.c +++ b/libs/wine/ldt.c @@ -92,6 +92,11 @@ static inline int set_thread_area( struct modify_ldt_s *ptr ) #include <machine/sysarch.h> #endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */ +#ifdef __GNU__ +#include <mach/i386/mach_i386.h> +#include <mach/mach_traps.h> +#endif + #ifdef __APPLE__ #include <i386/user_ldt.h> #endif @@ -203,6 +208,9 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry ) #elif defined(__APPLE__) if ((ret = i386_set_ldt(index, (union ldt_entry *)entry, 1)) < 0) perror("i386_set_ldt"); +#elif defined(__GNU__) + if ((ret = i386_set_ldt(mach_thread_self(), sel, (descriptor_list_t)entry, 1)) != KERN_SUCCESS) + perror("i386_set_ldt"); #else fprintf( stderr, "No LDT support on this platform\n" ); exit(1);
1
0
0
0
Michael Stefaniuc : dmusic: Don' t hardcode the guidClass in IDirectMusicObject::ParseDescriptor.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: 84df351b1e246b8bc214f147ba6bc4ba4a15ab14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84df351b1e246b8bc214f147b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Jan 6 00:01:53 2014 +0100 dmusic: Don't hardcode the guidClass in IDirectMusicObject::ParseDescriptor. --- dlls/dmusic/collection.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index 4c6a034..20380fe 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -269,7 +269,7 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_ParseDescrip /* FIXME: should this be determined from stream? */ desc->dwValidData |= DMUS_OBJ_CLASS; - desc->guidClass = CLSID_DirectMusicCollection; + desc->guidClass = This->pDesc->guidClass; hr = read_from_stream(stream, &chunk, sizeof(FOURCC) + sizeof(DWORD)); if (FAILED(hr))
1
0
0
0
Michael Stefaniuc : dmusic/tests: Add some DirectMusicCollection tests.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: dc9208a0c535e62e99036b5960f032b14dddf021 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc9208a0c535e62e99036b596…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jan 5 23:56:39 2014 +0100 dmusic/tests: Add some DirectMusicCollection tests. --- dlls/dmusic/tests/dmusic.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c index 3e67c56..4291d71 100644 --- a/dlls/dmusic/tests/dmusic.c +++ b/dlls/dmusic/tests/dmusic.c @@ -320,6 +320,46 @@ static void test_COM_dmcoll(void) while (IDirectMusicCollection_Release(dmc)); } +static void test_dmcoll(void) +{ + IDirectMusicCollection *dmc; + IDirectMusicObject *dmo; + DMUS_OBJECTDESC desc; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicCollection, (void**)&dmc); + ok(hr == S_OK, "DirectMusicCollection create failed: %08x, expected S_OK\n", hr); + + /* IDirectMusicObject */ + hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IDirectMusicObject, (void**)&dmo); + ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr); + hr = IDirectMusicObject_GetDescriptor(dmo, NULL); + ok(hr == E_POINTER, "IDirectMusicObject_GetDescriptor: expected E_POINTER, got %08x\n", hr); + hr = IDirectMusicObject_SetDescriptor(dmo, NULL); + ok(hr == E_POINTER, "IDirectMusicObject_SetDescriptor: expected E_POINTER, got %08x\n", hr); + ZeroMemory(&desc, sizeof(desc)); + hr = IDirectMusicObject_GetDescriptor(dmo, &desc); + ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %08x\n", hr); + ok(desc.dwValidData == DMUS_OBJ_CLASS, + "Fresh object has more valid data (%08x) than DMUS_OBJ_CLASS\n", desc.dwValidData); + /* DMUS_OBJ_CLASS is immutable */ + desc.dwValidData = DMUS_OBJ_CLASS; + hr = IDirectMusicObject_SetDescriptor(dmo, &desc); + ok(hr == S_FALSE , "IDirectMusicObject_SetDescriptor failed: %08x\n", hr); + ok(!desc.dwValidData, "dwValidData wasn't cleared: %08x\n", desc.dwValidData); + desc.dwValidData = DMUS_OBJ_CLASS; + desc.guidClass = CLSID_DirectMusicSegment; + hr = IDirectMusicObject_SetDescriptor(dmo, &desc); + ok(hr == S_FALSE && !desc.dwValidData, "IDirectMusicObject_SetDescriptor failed: %08x\n", hr); + hr = IDirectMusicObject_GetDescriptor(dmo, &desc); + ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %08x\n", hr); + ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection), + "guidClass changed, should be CLSID_DirectMusicCollection\n"); + + while (IDirectMusicCollection_Release(dmc)); +} + static BOOL missing_dmusic(void) { IDirectMusic8 *dm; @@ -348,6 +388,7 @@ START_TEST(dmusic) test_COM_dmcoll(); test_dmusic(); test_dmbuffer(); + test_dmcoll(); CoUninitialize(); }
1
0
0
0
Michael Stefaniuc : dmusic: Don't crash on NULL in IDirectMusicObject:: GetDescriptor.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: fe0d2a2ba796dc0551cef08098a42a405738b421 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe0d2a2ba796dc0551cef0809…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jan 5 23:51:17 2014 +0100 dmusic: Don't crash on NULL in IDirectMusicObject::GetDescriptor. --- dlls/dmusic/collection.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index a519b2a..4c6a034 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -181,7 +181,9 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_GetDescripto TRACE("(%p/%p)->(%p)\n", iface, This, pDesc); - /* I think we shouldn't return pointer here since then values can be changed; it'd be a mess */ + if (!pDesc) + return E_POINTER; + memcpy (pDesc, This->pDesc, This->pDesc->dwSize); return S_OK;
1
0
0
0
Michael Stefaniuc : dmusic: The object class is immutable in a DirectMusicObject.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: fda99c0fcc96729b096a1434820f90ec7ab6886a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fda99c0fcc96729b096a14348…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jan 5 23:48:46 2014 +0100 dmusic: The object class is immutable in a DirectMusicObject. --- dlls/dmusic/collection.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index cbcc082..a519b2a 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -189,7 +189,9 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_GetDescripto static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_SetDescriptor(LPDIRECTMUSICOBJECT iface, LPDMUS_OBJECTDESC pDesc) { - IDirectMusicCollectionImpl *This = impl_from_IDirectMusicObject(iface); + IDirectMusicCollectionImpl *This = impl_from_IDirectMusicObject(iface); + HRESULT ret = S_OK; + TRACE("(%p, %p)\n", iface, pDesc); @@ -206,7 +208,10 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_SetDescripto if (pDesc->dwValidData & DMUS_OBJ_OBJECT) This->pDesc->guidObject = pDesc->guidObject; if (pDesc->dwValidData & DMUS_OBJ_CLASS) - This->pDesc->guidClass = pDesc->guidClass; + { + pDesc->dwValidData &= ~DMUS_OBJ_CLASS; + ret = S_FALSE; + } if (pDesc->dwValidData & DMUS_OBJ_NAME) lstrcpynW(This->pDesc->wszName, pDesc->wszName, DMUS_MAX_NAME); if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) @@ -229,7 +234,7 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_SetDescripto /* add new flags */ This->pDesc->dwValidData |= pDesc->dwValidData; - return S_OK; + return ret; } static HRESULT read_from_stream(IStream *stream, void *data, ULONG size)
1
0
0
0
Michael Stefaniuc : dmusic: Don' t leak mem if DirectMusicCollection creation fails.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: 5771ff8912506d5f998d181a23ee4d382f00cfcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5771ff8912506d5f998d181a2…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jan 5 23:43:00 2014 +0100 dmusic: Don't leak mem if DirectMusicCollection creation fails. --- dlls/dmusic/collection.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index a673390..cbcc082 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -805,6 +805,7 @@ static const IPersistStreamVtbl DirectMusicCollection_PersistStream_Vtbl = { HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl(LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { IDirectMusicCollectionImpl* obj; + HRESULT hr; *ppobj = NULL; if (pUnkOuter) @@ -821,8 +822,11 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl(LPCGUID lpcGUID, LPVOID* p DM_STRUCT_INIT(obj->pDesc); obj->pDesc->dwValidData |= DMUS_OBJ_CLASS; obj->pDesc->guidClass = CLSID_DirectMusicCollection; - obj->ref = 0; /* will be inited by QueryInterface */ + obj->ref = 1; list_init (&obj->Instruments); - return IDirectMusicCollection_QueryInterface(&obj->IDirectMusicCollection_iface, lpcGUID, ppobj); + hr = IDirectMusicCollection_QueryInterface(&obj->IDirectMusicCollection_iface, lpcGUID, ppobj); + IDirectMusicCollection_Release(&obj->IDirectMusicCollection_iface); + + return hr; }
1
0
0
0
Michael Stefaniuc : dmusic: Always AddRef the returned iface in QueryInterface.
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: d3c550d0ba36e8ed7c2c9c8741d59b7df01b96c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d3c550d0ba36e8ed7c2c9c874…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sun Jan 5 23:38:33 2014 +0100 dmusic: Always AddRef the returned iface in QueryInterface. --- dlls/dmusic/collection.c | 27 +++++++++------------------ 1 files changed, 9 insertions(+), 18 deletions(-) diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index f98bc19..a673390 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -48,31 +48,22 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_QueryInt TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface); - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IDirectMusicCollection)) - { + *ret_iface = NULL; + + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirectMusicCollection)) *ret_iface = iface; - IDirectMusicCollection_AddRef(iface); - return S_OK; - } else if (IsEqualIID(riid, &IID_IDirectMusicObject)) - { *ret_iface = &This->IDirectMusicObject_iface; - IDirectMusicCollection_AddRef(iface); - return S_OK; - } else if (IsEqualIID(riid, &IID_IPersistStream)) - { *ret_iface = &This->IPersistStream_iface; - IDirectMusicCollection_AddRef(iface); - return S_OK; + else + { + WARN("(%p/%p)->(%s, %p): not found\n", iface, This, debugstr_dmguid(riid), ret_iface); + return E_NOINTERFACE; } - *ret_iface = NULL; - - WARN("(%p/%p)->(%s, %p): not found\n", iface, This, debugstr_dmguid(riid), ret_iface); - - return E_NOINTERFACE; + IUnknown_AddRef((IUnknown*)*ret_iface); + return S_OK; } static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef(LPDIRECTMUSICCOLLECTION iface)
1
0
0
0
Nikolay Sivov : dwrite: Implement ConvertFontFaceToLOGFONT().
by Alexandre Julliard
06 Jan '14
06 Jan '14
Module: wine Branch: master Commit: 5e4d5ebde73db6340986abdf3d13b6f7844e76d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e4d5ebde73db6340986abdf3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 6 01:24:17 2014 +0400 dwrite: Implement ConvertFontFaceToLOGFONT(). --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 11 ++++++++ dlls/dwrite/gdiinterop.c | 6 ++-- dlls/dwrite/tests/font.c | 53 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 0c2698e..5450732 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -72,6 +72,7 @@ static inline LPWSTR heap_strdupnW(const WCHAR *str, UINT32 len) } extern HRESULT create_font_from_logfont(const LOGFONTW*, IDWriteFont**) DECLSPEC_HIDDEN; +extern HRESULT convert_fontface_to_logfont(IDWriteFontFace*, LOGFONTW*) DECLSPEC_HIDDEN; extern HRESULT create_textformat(const WCHAR*,IDWriteFontCollection*,DWRITE_FONT_WEIGHT,DWRITE_FONT_STYLE,DWRITE_FONT_STRETCH, FLOAT,const WCHAR*,IDWriteTextFormat**) DECLSPEC_HIDDEN; extern HRESULT create_textlayout(const WCHAR*,UINT32,IDWriteTextFormat*,IDWriteTextLayout**) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index ec18312..2564d67 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -396,6 +396,8 @@ static HRESULT create_fontface(struct dwrite_font *font, IDWriteFontFace **face) memset(&This->logfont, 0, sizeof(This->logfont)); This->logfont.lfItalic = font->style == DWRITE_FONT_STYLE_ITALIC; + /* weight values from DWRITE_FONT_WEIGHT match values used for LOGFONT */ + This->logfont.lfWeight = font->weight; strcpyW(This->logfont.lfFaceName, font->facename); *face = &This->IDWriteFontFace_iface; @@ -403,6 +405,15 @@ static HRESULT create_fontface(struct dwrite_font *font, IDWriteFontFace **face) return S_OK; } +HRESULT convert_fontface_to_logfont(IDWriteFontFace *face, LOGFONTW *logfont) +{ + struct dwrite_fontface *fontface = impl_from_IDWriteFontFace(face); + + *logfont = fontface->logfont; + + return S_OK; +} + static HRESULT WINAPI dwritefont_QueryInterface(IDWriteFont *iface, REFIID riid, void **obj) { struct dwrite_font *This = impl_from_IDWriteFont(iface); diff --git a/dlls/dwrite/gdiinterop.c b/dlls/dwrite/gdiinterop.c index 496f099..bb24305 100644 --- a/dlls/dwrite/gdiinterop.c +++ b/dlls/dwrite/gdiinterop.c @@ -242,10 +242,10 @@ static HRESULT WINAPI gdiinterop_ConvertFontToLOGFONT(IDWriteGdiInterop *iface, } static HRESULT WINAPI gdiinterop_ConvertFontFaceToLOGFONT(IDWriteGdiInterop *iface, - IDWriteFontFace *font, LOGFONTW *logfont) + IDWriteFontFace *fontface, LOGFONTW *logfont) { - FIXME("(%p %p): stub\n", font, logfont); - return E_NOTIMPL; + TRACE("(%p %p)\n", fontface, logfont); + return convert_fontface_to_logfont(fontface, logfont); } static HRESULT WINAPI gdiinterop_CreateFontFaceFromHdc(IDWriteGdiInterop *iface, diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 8404c22..a4a7854 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -561,6 +561,58 @@ static void test_system_fontcollection(void) IDWriteFontCollection_Release(collection); } +static void test_ConvertFontFaceToLOGFONT(void) +{ + IDWriteGdiInterop *interop; + IDWriteFontFace *fontface; + IDWriteFont *font; + LOGFONTW logfont; + HRESULT hr; + + hr = IDWriteFactory_GetGdiInterop(factory, &interop); + ok(hr == S_OK, "got 0x%08x\n", hr); + + memset(&logfont, 0, sizeof(logfont)); + logfont.lfHeight = 12; + logfont.lfWidth = 12; + logfont.lfEscapement = 100; + logfont.lfWeight = FW_NORMAL; + logfont.lfItalic = 1; + logfont.lfUnderline = 1; + logfont.lfStrikeOut = 1; + + lstrcpyW(logfont.lfFaceName, tahomaW); + + hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, &logfont, &font); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDWriteFont_CreateFontFace(font, &fontface); + ok(hr == S_OK, "got 0x%08x\n", hr); + +if (0) /* crashes on native */ +{ + hr = IDWriteGdiInterop_ConvertFontFaceToLOGFONT(interop, NULL, NULL); + hr = IDWriteGdiInterop_ConvertFontFaceToLOGFONT(interop, fontface, NULL); +} + + memset(&logfont, 0xa, sizeof(logfont)); + logfont.lfFaceName[0] = 0; + + hr = IDWriteGdiInterop_ConvertFontFaceToLOGFONT(interop, fontface, &logfont); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(logfont.lfHeight == 0, "got %d\n", logfont.lfHeight); + ok(logfont.lfWidth == 0, "got %d\n", logfont.lfWidth); + ok(logfont.lfWeight == FW_NORMAL, "got %d\n", logfont.lfWeight); + ok(logfont.lfEscapement == 0, "got %d\n", logfont.lfEscapement); + ok(logfont.lfItalic == 1, "got %d\n", logfont.lfItalic); + ok(logfont.lfUnderline == 0, "got %d\n", logfont.lfUnderline); + ok(logfont.lfStrikeOut == 0, "got %d\n", logfont.lfStrikeOut); + ok(!lstrcmpW(logfont.lfFaceName, tahomaW), "got %s\n", wine_dbgstr_w(logfont.lfFaceName)); + + IDWriteGdiInterop_Release(interop); + IDWriteFontFace_Release(fontface); +} + START_TEST(font) { HRESULT hr; @@ -580,6 +632,7 @@ START_TEST(font) test_CreateFontFace(); test_GetMetrics(); test_system_fontcollection(); + test_ConvertFontFaceToLOGFONT(); IDWriteFactory_Release(factory); }
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
82
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
Results per page:
10
25
50
100
200