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
November 2021
----- 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
951 discussions
Start a n
N
ew thread
Alistair Leslie-Hughes : msdasql: Fix use after free (Coverity).
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: b5c4d178a05de316e90a6bde15481a19677730a5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b5c4d178a05de316e90a6bde…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Nov 8 21:29:11 2021 +1100 msdasql: Fix use after free (Coverity). Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdasql/tests/provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msdasql/tests/provider.c b/dlls/msdasql/tests/provider.c index d093c3c2087..9b75f40a741 100644 --- a/dlls/msdasql/tests/provider.c +++ b/dlls/msdasql/tests/provider.c @@ -130,8 +130,8 @@ static void test_Properties(void) hr = IDBProperties_GetProperties(props, 1, &propidlist, &propcnt, &propset); ok(hr == S_OK, "got 0x%08x\n", hr); - ok(propidlist.cPropertyIDs == 14, "got %d\n", propinfoset->cPropertyInfos); - ok(propset->cProperties == 14, "got %d\n", propinfoset->cPropertyInfos); + ok(propidlist.cPropertyIDs == 14, "got %d\n", propidlist.cPropertyIDs); + ok(propset->cProperties == 14, "got %d\n", propset->cProperties); for (i = 0; i < propidlist.cPropertyIDs; i++) {
1
0
0
0
Alistair Leslie-Hughes : msdasql: Correct default dialect logic.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: c8b0e5b138723702a31c7618998b1ad676146deb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c8b0e5b138723702a31c7618…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Nov 8 21:29:10 2021 +1100 msdasql: Correct default dialect logic. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdasql/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msdasql/session.c b/dlls/msdasql/session.c index 98a1fc50220..e52e8cd18d8 100644 --- a/dlls/msdasql/session.c +++ b/dlls/msdasql/session.c @@ -847,7 +847,7 @@ static HRESULT WINAPI command_SetCommandText(ICommandText *iface, REFGUID dialec struct command *command = impl_from_ICommandText( iface ); TRACE("%p, %s, %s\n", command, debugstr_guid(dialect), debugstr_w(commandstr)); - if (IsEqualGUID(&DBGUID_DEFAULT, dialect)) + if (!IsEqualGUID(&DBGUID_DEFAULT, dialect)) FIXME("Currently non Default Dialect isn't supported\n"); heap_free(command->query);
1
0
0
0
Alistair Leslie-Hughes : msdasql: Trace session interfaces.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 7d686c226371b7b333590eb25eb4ed2f4c5c3f13 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d686c226371b7b333590eb2…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Nov 8 21:29:09 2021 +1100 msdasql: Trace session interfaces. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdasql/session.c | 10 ++++++++++ dlls/msdasql/tests/provider.c | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/dlls/msdasql/session.c b/dlls/msdasql/session.c index 0298c7e7424..98a1fc50220 100644 --- a/dlls/msdasql/session.c +++ b/dlls/msdasql/session.c @@ -102,6 +102,16 @@ static HRESULT WINAPI session_QueryInterface(IUnknown *iface, REFIID riid, void TRACE("(%p)->(IDBCreateCommand_iface %p)\n", iface, ppv); *ppv = &session->IDBCreateCommand_iface; } + else if(IsEqualGUID(&IID_IBindResource, riid)) + { + TRACE("(%p)->(IID_IBindResource not support)\n", iface); + return E_NOINTERFACE; + } + else if(IsEqualGUID(&IID_ICreateRow, riid)) + { + TRACE("(%p)->(IID_ICreateRow not support)\n", iface); + return E_NOINTERFACE; + } if(*ppv) { diff --git a/dlls/msdasql/tests/provider.c b/dlls/msdasql/tests/provider.c index 6ffe17e7028..d093c3c2087 100644 --- a/dlls/msdasql/tests/provider.c +++ b/dlls/msdasql/tests/provider.c @@ -367,6 +367,8 @@ static void test_sessions(void) IDBCreateCommand *create_command = NULL; IGetDataSource *datasource = NULL; ISessionProperties *session_props = NULL; + IUnknown *unimplemented = NULL; + ITransactionJoin *join = NULL; IUnknown *cmd = NULL; HRESULT hr; BSTR connect_str; @@ -415,6 +417,17 @@ static void test_sessions(void) ok(hr == S_OK, "got 0x%08x\n", hr); IGetDataSource_Release(datasource); + hr = IUnknown_QueryInterface(session, &IID_ITransactionJoin, (void**)&join); + todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + if(hr == S_OK) + ITransactionJoin_Release(join); + + hr = IUnknown_QueryInterface(session, &IID_IBindResource, (void**)&unimplemented); + ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + + hr = IUnknown_QueryInterface(session, &IID_ICreateRow, (void**)&unimplemented); + ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + hr = IUnknown_QueryInterface(session, &IID_ISessionProperties, (void**)&session_props); ok(hr == S_OK, "got 0x%08x\n", hr); ISessionProperties_Release(session_props);
1
0
0
0
Alistair Leslie-Hughes : include: Add trnjoi.idl.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 0977ce7cef28d135664a0ee4a18ee51eb30db363 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0977ce7cef28d135664a0ee4…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Nov 8 21:29:08 2021 +1100 include: Add trnjoi.idl. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdaps/usrmarshal.c | 28 ++++++++++++++++++++++++++++ include/Makefile.in | 1 + include/oledb.idl | 1 + include/trnjoi.idl | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index 8910070fbac..dc0f2261096 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -1741,3 +1741,31 @@ HRESULT __RPC_STUB ICommandWithParameters_MapParameterNames_Stub(ICommandWithPar FIXME("(%p)->(%ld %p %p %p): stub\n", This, count, names, ordinals, error); return E_NOTIMPL; } + +HRESULT __RPC_STUB ITransactionJoin_GetOptionsObject_Stub(ITransactionJoin* This, + ITransactionOptions **options, IErrorInfo **error) +{ + FIXME("(%p)->(%p, %p): stub\n", This, options, error); + return E_NOTIMPL; +} + +HRESULT CALLBACK ITransactionJoin_GetOptionsObject_Proxy(ITransactionJoin *This, + ITransactionOptions **options) +{ + FIXME("(%p)->(%p): stub\n", This, options); + return E_NOTIMPL; +} + +HRESULT __RPC_STUB ITransactionJoin_JoinTransaction_Stub(ITransactionJoin* This, IUnknown *unk, + ISOLEVEL level, ULONG flags, ITransactionOptions *options, IErrorInfo **error) +{ + FIXME("(%p)->(%p, %d, 0x%08x, %p, %p): stub\n", This, unk, level, flags, options, error); + return E_NOTIMPL; +} + +HRESULT CALLBACK ITransactionJoin_JoinTransaction_Proxy(ITransactionJoin* This, IUnknown *unk, + ISOLEVEL level, ULONG flags, ITransactionOptions *options) +{ + FIXME("(%p)->(%p, %d, 0x%08x, %p): stub\n", This, unk, level, flags, options); + return E_NOTIMPL; +} diff --git a/include/Makefile.in b/include/Makefile.in index ff7aa1b0ff5..114440f8b39 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -712,6 +712,7 @@ SOURCES = \ tpcshrd.h \ traffic.h \ transact.idl \ + trnjoi.idl \ twain.h \ txcoord.idl \ txdtc.idl \ diff --git a/include/oledb.idl b/include/oledb.idl index b889d72bc38..abd4d55069c 100644 --- a/include/oledb.idl +++ b/include/oledb.idl @@ -80,6 +80,7 @@ typedef LONG_PTR DB_LRESERVE; #include "rstupd.idl" #include "mulres.idl" #include "transact.idl" +#include "trnjoi.idl" #include "cmdwpr.idl" cpp_quote("#include <accctrl.h>") diff --git a/include/trnjoi.idl b/include/trnjoi.idl new file mode 100644 index 00000000000..fcc22ce5ea3 --- /dev/null +++ b/include/trnjoi.idl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2021 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#if 0 +#pragma makedep install +#endif + +[ + object, + uuid(0c733a5e-2a1c-11ce-ade5-00aa0044773d), + pointer_default(unique) +] +interface ITransactionJoin : IUnknown +{ + [local] + HRESULT GetOptionsObject(ITransactionOptions **options); + + [call_as(GetOptionsObject)] + HRESULT RemoteGetOptionsObject([out] ITransactionOptions **options, [out] IErrorInfo **error); + + [local] + HRESULT JoinTransaction(IUnknown *unk, [in] ISOLEVEL level, [in] ULONG flags, ITransactionOptions *options); + + [call_as(JoinTransaction)] + HRESULT RemoteJoinTransaction([in, unique] IUnknown *unk, [in] ISOLEVEL level, [in] ULONG flags, + [in] ITransactionOptions *options, [out] IErrorInfo **error); +}
1
0
0
0
Alistair Leslie-Hughes : include: Add transact.idl to oledb.idl.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 617330ca2bd4615b9190b909b271bf50c0f1102a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=617330ca2bd4615b9190b909…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Nov 8 21:29:07 2021 +1100 include: Add transact.idl to oledb.idl. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xolehlp/Makefile.in | 2 +- include/oledb.idl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/xolehlp/Makefile.in b/dlls/xolehlp/Makefile.in index 4f5bd781a58..f39cd90f0b9 100644 --- a/dlls/xolehlp/Makefile.in +++ b/dlls/xolehlp/Makefile.in @@ -1,5 +1,5 @@ MODULE = xolehlp.dll -IMPORTS = adsiid uuid +IMPORTS = uuid EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/include/oledb.idl b/include/oledb.idl index 49c0c304b2d..b889d72bc38 100644 --- a/include/oledb.idl +++ b/include/oledb.idl @@ -79,6 +79,7 @@ typedef LONG_PTR DB_LRESERVE; #include "rstchg.idl" #include "rstupd.idl" #include "mulres.idl" +#include "transact.idl" #include "cmdwpr.idl" cpp_quote("#include <accctrl.h>")
1
0
0
0
Alistair Leslie-Hughes : msdasql: Implement IDBProperties SetProperties.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 0f0d3c48594ed6025ad0ce18d8edd90b550ec1f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0f0d3c48594ed6025ad0ce18…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Mon Nov 8 21:29:06 2021 +1100 msdasql: Implement IDBProperties SetProperties. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdasql/msdasql_main.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/msdasql/msdasql_main.c b/dlls/msdasql/msdasql_main.c index d14f7957978..e58facc47fc 100644 --- a/dlls/msdasql/msdasql_main.c +++ b/dlls/msdasql/msdasql_main.c @@ -424,10 +424,27 @@ static HRESULT WINAPI dbprops_SetProperties(IDBProperties *iface, ULONG cPropert DBPROPSET rgPropertySets[]) { struct msdasql *provider = impl_from_IDBProperties(iface); + int i, j, k; - FIXME("(%p)->(%d %p)\n", provider, cPropertySets, rgPropertySets); + TRACE("(%p)->(%d %p)\n", provider, cPropertySets, rgPropertySets); - return E_NOTIMPL; + for (i=0; i < cPropertySets; i++) + { + for (j=0; j < rgPropertySets[i].cProperties; j++) + { + for(k=0; k < ARRAY_SIZE(provider->properties); k++) + { + if (provider->properties[k].id == rgPropertySets[i].rgProperties[j].dwPropertyID) + { + TRACE("Found property %d\n", provider->properties[k].id); + VariantCopy(&provider->properties[k].value, &rgPropertySets[i].rgProperties[j].vValue); + break; + } + } + } + } + + return S_OK; } static const struct IDBPropertiesVtbl dbprops_vtbl =
1
0
0
0
Andrew Eikum : msvcrt: Better handle multiple width specifiers.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 0c6bab9339d62c8952692911f055ccbc95d956f6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0c6bab9339d62c8952692911…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Nov 8 09:42:45 2021 -0600 msvcrt: Better handle multiple width specifiers. Includes feedback from David Gow <david(a)davidgow.net> and Piotr Caban. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/printf.h | 9 ++++++++- dlls/msvcrt/tests/printf.c | 12 ++++++++++++ dlls/ucrtbase/tests/printf.c | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h index aeb1290f48f..c34479c5688 100644 --- a/dlls/msvcrt/printf.h +++ b/dlls/msvcrt/printf.h @@ -1050,7 +1050,14 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API flags.LeftAlign = TRUE; flags.FieldLength = -flags.FieldLength; } - } else while (*p >= '0' && *p <= '9') { + } + +#if _MSVCR_VER >= 140 + if (*p >= '0' && *p <= '9') + flags.FieldLength = 0; +#endif + + while (*p >= '0' && *p <= '9') { flags.FieldLength *= 10; flags.FieldLength += *p++ - '0'; } diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index 06acf4c8450..010cad0ab8f 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -396,6 +396,18 @@ static void test_sprintf( void ) ok(!strcmp(buffer, "string to copy"), "failed: \"%s\"\n", buffer); setlocale(LC_ALL, "C"); + + r = p_sprintf(buffer, "%*1d", 1, 3); + ok(r==11, "r = %d\n", r); + ok(!strcmp(buffer, " 3"), "failed: \"%s\"\n", buffer); + + r = p_sprintf(buffer, "%0*0d", 1, 2); + ok(r==10, "r = %d\n", r); + ok(!strcmp(buffer, "0000000002"), "failed: \"%s\"\n", buffer); + + r = p_sprintf(buffer, "% *2d", 0, 7); + ok(r==2, "r = %d\n", r); + ok(!strcmp(buffer, " 7"), "failed: \"%s\"\n", buffer); } static void test_swprintf( void ) diff --git a/dlls/ucrtbase/tests/printf.c b/dlls/ucrtbase/tests/printf.c index 4f20ccff9a4..51a54426bc4 100644 --- a/dlls/ucrtbase/tests/printf.c +++ b/dlls/ucrtbase/tests/printf.c @@ -845,6 +845,24 @@ static void test_printf_fp(void) } } +static void test_printf_width_specification(void) +{ + int r; + char buffer[20]; + + r = vsprintf_wrapper(0, buffer, sizeof(buffer), "%0*2d", 1, 3); + ok(r == 2, "r = %d\n", r); + ok(!strcmp(buffer, "03"), "buffer wrong, got=%s\n", buffer); + + r = vsprintf_wrapper(0, buffer, sizeof(buffer), "%*0d", 1, 2); + ok(r == 1, "r = %d\n", r); + ok(!strcmp(buffer, "2"), "buffer wrong, got=%s\n", buffer); + + r = vsprintf_wrapper(0, buffer, sizeof(buffer), "% *2d", 0, 7); + ok(r == 2, "r = %d\n", r); + ok(!strcmp(buffer, " 7"), "buffer wrong, got=%s\n", buffer); +} + START_TEST(printf) { ok(_set_invalid_parameter_handler(test_invalid_parameter_handler) == NULL, @@ -862,4 +880,5 @@ START_TEST(printf) test_printf_c99(); test_printf_natural_string(); test_printf_fp(); + test_printf_width_specification(); }
1
0
0
0
Nikolay Sivov : evr/presenter: Add missing break in get_FramesDrawn() (Coverity).
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: e57e19c2360beb6ec27a65aa75f29d14636cd321 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e57e19c2360beb6ec27a65aa…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 8 14:57:03 2021 +0300 evr/presenter: Add missing break in get_FramesDrawn() (Coverity). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/presenter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index 5f70d173c0b..fd02404b7af 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -1754,6 +1754,7 @@ static HRESULT WINAPI video_presenter_qualprop_get_FramesDrawn(IQualProp *iface, case PRESENTER_STATE_PAUSED: if (frames) *frames = presenter->frame_stats.presented; else hr = E_POINTER; + break; default: hr = E_NOTIMPL; }
1
0
0
0
Nikolay Sivov : evr/presenter: Remove logic related to picture aspect ratio adjustment.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 7462d77f0b8e53ac1c425b7d3e4beac39d0de594 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7462d77f0b8e53ac1c425b7d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 8 14:57:02 2021 +0300 evr/presenter: Remove logic related to picture aspect ratio adjustment. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/presenter.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index 0381cb3e593..5f70d173c0b 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -483,8 +483,6 @@ static void video_presenter_sample_present(struct video_presenter *presenter, IM { IDirect3DSurface9 *surface, *backbuffer; IDirect3DDevice9 *device; - D3DSURFACE_DESC desc; - RECT dst, src; HRESULT hr; if (!presenter->swapchain) @@ -506,38 +504,7 @@ static void video_presenter_sample_present(struct video_presenter *presenter, IM IDirect3DSwapChain9_GetDevice(presenter->swapchain, &device); IDirect3DDevice9_StretchRect(device, surface, NULL, backbuffer, NULL, D3DTEXF_POINT); - IDirect3DSurface9_GetDesc(surface, &desc); - SetRect(&src, 0, 0, desc.Width, desc.Height); - - IDirect3DSurface9_GetDesc(backbuffer, &desc); - SetRect(&dst, 0, 0, desc.Width, desc.Height); - - if (presenter->ar_mode & MFVideoARMode_PreservePicture) - { - unsigned int src_width = src.right - src.left, src_height = src.bottom - src.top; - unsigned int dst_width = dst.right - dst.left, dst_height = dst.bottom - dst.top; - - if (src_width * dst_height > dst_width * src_height) - { - /* src is "wider" than dst. */ - unsigned int dst_center = (dst.top + dst.bottom) / 2; - unsigned int scaled_height = src_height * dst_width / src_width; - - dst.top = dst_center - scaled_height / 2; - dst.bottom = dst.top + scaled_height; - } - else if (src_width * dst_height < dst_width * src_height) - { - /* src is "taller" than dst. */ - unsigned int dst_center = (dst.left + dst.right) / 2; - unsigned int scaled_width = src_width * dst_height / src_height; - - dst.left = dst_center - scaled_width / 2; - dst.right = dst.left + scaled_width; - } - } - - IDirect3DSwapChain9_Present(presenter->swapchain, &src, &dst, NULL, NULL, 0); + IDirect3DSwapChain9_Present(presenter->swapchain, NULL, NULL, NULL, NULL, 0); presenter->frame_stats.presented++; IDirect3DDevice9_Release(device);
1
0
0
0
Nikolay Sivov : evr/mixer: Preserve frame aspect ratio when rendering.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 4b6df3a66c6dfcf33d3f05d73f0bafe7c0cbbd27 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4b6df3a66c6dfcf33d3f05d7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 8 14:57:01 2021 +0300 evr/mixer: Preserve frame aspect ratio when rendering. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/mixer.c | 109 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 52 deletions(-) diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index b6b4d148f90..4f5837a49a4 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -45,6 +45,7 @@ struct input_stream IMFMediaType *media_type; MFVideoNormalizedRect rect; unsigned int zorder; + SIZE frame_size; IMFSample *sample; unsigned int sample_requested : 1; }; @@ -100,6 +101,7 @@ struct video_mixer COLORREF rgba; DXVA2_AYUVSample16 ayuv; } bkgnd_color; + MFVideoArea aperture; LONGLONG lower_bound; LONGLONG upper_bound; CRITICAL_SECTION cs; @@ -864,6 +866,8 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW if (mixer->inputs[0].media_type) IMFMediaType_Release(mixer->inputs[0].media_type); mixer->inputs[0].media_type = media_type; + mixer->inputs[0].frame_size.cx = video_desc.SampleWidth; + mixer->inputs[0].frame_size.cy = video_desc.SampleHeight; IMFMediaType_AddRef(mixer->inputs[0].media_type); } CoTaskMemFree(guids); @@ -939,6 +943,11 @@ static HRESULT WINAPI video_mixer_transform_SetOutputType(IMFTransform *iface, D if (SUCCEEDED(hr = IDirectXVideoProcessorService_CreateVideoProcessor(service, &mixer->output.rt_formats[i].device, &video_desc, rt_format, MAX_MIXER_INPUT_SUBSTREAMS, &mixer->processor))) { + if (FAILED(IMFMediaType_GetBlob(type, &MF_MT_GEOMETRIC_APERTURE, (UINT8 *)&mixer->aperture, + sizeof(mixer->aperture), NULL))) + { + memset(&mixer->aperture, 0, sizeof(mixer->aperture)); + } if (mixer->output.media_type) IMFMediaType_Release(mixer->output.media_type); mixer->output.media_type = type; @@ -1234,46 +1243,60 @@ static HRESULT video_mixer_get_d3d_device(struct video_mixer *mixer, IDirect3DDe return hr; } +static BOOL video_mixer_rect_needs_scaling(const MFVideoNormalizedRect *scale) +{ + return scale->left != 0.0f || scale->top != 0.0f || scale->right != 1.0f || scale->bottom != 1.0f; +} + static void video_mixer_scale_rect(RECT *rect, unsigned int width, unsigned int height, const MFVideoNormalizedRect *scale) { - if (scale->left == 0.0f && scale->top == 0.0f && scale->right == 1.0f && scale->bottom == 1.0f) - { - SetRect(rect, 0, 0, width, height); - } - else + if (video_mixer_rect_needs_scaling(scale)) { rect->left = width * scale->left; rect->right = width * scale->right; rect->top = height * scale->top; rect->bottom = height * scale->bottom; } + else + SetRect(rect, 0, 0, width, height); } -static void video_mixer_normalize_rect(const RECT *full, const RECT *part, MFVideoNormalizedRect *ret) +static void video_mixer_correct_aspect_ratio(const RECT *src, RECT *dst) { - float width = full->right - full->left; - float height = full->bottom - full->top; + unsigned int src_width = src->right - src->left, src_height = src->bottom - src->top; + unsigned int dst_width = dst->right - dst->left, dst_height = dst->bottom - dst->top; - ret->left = (part->left - full->left) / width; - ret->right = (part->right - full->left) / width; - ret->bottom = (part->bottom - full->top) / height; - ret->top = (part->top - full->top) / height; + if (src_width * dst_height > dst_width * src_height) + { + /* src is "wider" than dst. */ + unsigned int dst_center = (dst->top + dst->bottom) / 2; + unsigned int scaled_height = src_height * dst_width / src_width; + + dst->top = dst_center - scaled_height / 2; + dst->bottom = dst->top + scaled_height; + } + else if (src_width * dst_height < dst_width * src_height) + { + /* src is "taller" than dst. */ + unsigned int dst_center = (dst->left + dst->right) / 2; + unsigned int scaled_width = src_width * dst_height / src_height; + + dst->left = dst_center - scaled_width / 2; + dst->right = dst->left + scaled_width; + } } static void video_mixer_render(struct video_mixer *mixer, IDirect3DSurface9 *rt) { DXVA2_VideoSample samples[MAX_MIXER_INPUT_STREAMS] = {{ 0 }}; DXVA2_VideoProcessBltParams params = { 0 }; - MFVideoNormalizedRect zoom_rect, norm; - unsigned int i, sample_count = 0; - D3DSURFACE_DESC desc, rt_desc; + MFVideoNormalizedRect zoom_rect; struct input_stream *stream; HRESULT hr = S_OK; + unsigned int i; RECT dst; - IDirect3DSurface9_GetDesc(rt, &rt_desc); - if (FAILED(IMFAttributes_GetBlob(mixer->attributes, &VIDEO_ZOOM_RECT, (UINT8 *)&zoom_rect, sizeof(zoom_rect), NULL))) { @@ -1281,12 +1304,12 @@ static void video_mixer_render(struct video_mixer *mixer, IDirect3DSurface9 *rt) zoom_rect.right = zoom_rect.bottom = 1.0f; } - video_mixer_scale_rect(&dst, rt_desc.Width, rt_desc.Height, &zoom_rect); + SetRect(&dst, 0, 0, mixer->aperture.Area.cx, mixer->aperture.Area.cy); + OffsetRect(&dst, mixer->aperture.OffsetX.value, mixer->aperture.OffsetY.value); for (i = 0; i < mixer->input_count; ++i) { - RECT stream_dst, stream_vis; - + DXVA2_VideoSample *sample = &samples[i]; IDirect3DSurface9 *surface; stream = mixer->zorder[i]; @@ -1297,54 +1320,36 @@ static void video_mixer_render(struct video_mixer *mixer, IDirect3DSurface9 *rt) break; } - IDirect3DSurface9_GetDesc(surface, &desc); - - /* In order to compute source/destination rectangles for each stream: - - * per-stream rectangle is used to get destination rectangle in target coordinates; - * destination per-stream rectangle is clipped with zoom rectangle, applied to target coordinates; - * visible rectangle is scaled back to get source area of the stream that would be visible; - * visible rectangle is scaled back to get destination area in target coordinates for given steam. + /* Full input frame corrected to full destination rectangle. */ - */ + video_mixer_scale_rect(&sample->SrcRect, stream->frame_size.cx, stream->frame_size.cy, &zoom_rect); + CopyRect(&sample->DstRect, &dst); + video_mixer_correct_aspect_ratio(&sample->SrcRect, &sample->DstRect); - video_mixer_scale_rect(&stream_dst, rt_desc.Width, rt_desc.Height, &stream->rect); + if (video_mixer_rect_needs_scaling(&stream->rect)) + WARN("Ignoring stream %u rectangle %s.\n", stream->id, debugstr_normalized_rect(&stream->rect)); - /* Part of the stream that's visible after zooming. */ - if (!IntersectRect(&stream_vis, &stream_dst, &dst)) - { - IDirect3DSurface9_Release(surface); - continue; - } - - samples[sample_count].SampleFormat.SampleFormat = stream->id == 0 ? - DXVA2_SampleProgressiveFrame : DXVA2_SampleSubStream; - samples[sample_count].SrcSurface = surface; - - video_mixer_normalize_rect(&stream_dst, &stream_vis, &norm); - video_mixer_scale_rect(&samples[sample_count].SrcRect, desc.Width, desc.Height, &norm); - - video_mixer_normalize_rect(&dst, &stream_vis, &norm); - video_mixer_scale_rect(&samples[sample_count].DstRect, rt_desc.Width, rt_desc.Height, &norm); - samples[sample_count].PlanarAlpha = DXVA2_Fixed32OpaqueAlpha(); - - sample_count++; + sample->SampleFormat.SampleFormat = stream->id == 0 ? DXVA2_SampleProgressiveFrame : DXVA2_SampleSubStream; + sample->SrcSurface = surface; + sample->PlanarAlpha = DXVA2_Fixed32OpaqueAlpha(); } if (SUCCEEDED(hr)) { - SetRect(¶ms.TargetRect, 0, 0, rt_desc.Width, rt_desc.Height); + SetRect(¶ms.TargetRect, 0, 0, mixer->aperture.Area.cx, mixer->aperture.Area.cy); + OffsetRect(¶ms.TargetRect, mixer->aperture.OffsetX.value, mixer->aperture.OffsetY.value); + params.BackgroundColor = mixer->bkgnd_color.ayuv; params.Alpha = DXVA2_Fixed32OpaqueAlpha(); if (FAILED(hr = IDirectXVideoProcessor_VideoProcessBlt(mixer->processor, rt, ¶ms, samples, - sample_count, NULL))) + mixer->input_count, NULL))) { WARN("Failed to process samples, hr %#x.\n", hr); } } - for (i = 0; i < sample_count; ++i) + for (i = 0; i < mixer->input_count; ++i) { if (samples[i].SrcSurface) IDirect3DSurface9_Release(samples[i].SrcSurface);
1
0
0
0
← Newer
1
...
68
69
70
71
72
73
74
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200