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
July 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
838 discussions
Start a n
N
ew thread
Andrew Nguyen : msxml3/tests: Fix two minor leaks in test_mxwriter_properties().
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: 2ed7a025f6dc908fd794fb7b894d7a74832be93c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ed7a025f6dc908fd794fb7b8…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Fri Jul 15 07:38:20 2011 -0500 msxml3/tests: Fix two minor leaks in test_mxwriter_properties(). --- dlls/msxml3/tests/saxreader.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index ec1c1ec..14c5e5a 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -1012,6 +1012,7 @@ static void test_mxwriter_properties(void) hr = IMXWriter_get_encoding(writer, &str); ok(hr == S_OK, "got %08x\n", hr); ok(lstrcmpW(str, utf16W) == 0, "expected empty string, got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); /* invalid encoding name */ str = SysAllocString(testW); @@ -1025,6 +1026,7 @@ static void test_mxwriter_properties(void) hr = IMXWriter_get_version(writer, &str); ok(hr == S_OK, "got %08x\n", hr); ok(!lstrcmpW(str, _bstr_("1.0")), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); IMXWriter_Release(writer); free_bstrs();
1
0
0
0
Andrew Nguyen : msxml3: Extend the lifetime of the SAX callback BSTRs beyond the callback invocation .
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: 9c5d5d8ed5b95e60b61b8a31e85d5c5edee28c24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c5d5d8ed5b95e60b61b8a31e…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Fri Jul 15 07:38:07 2011 -0500 msxml3: Extend the lifetime of the SAX callback BSTRs beyond the callback invocation. --- dlls/msxml3/saxreader.c | 135 +++++++++++++++++++++++++++++++++++++---------- 1 files changed, 106 insertions(+), 29 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 4f0a5f1..5bf6eda 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -49,6 +49,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); #ifdef HAVE_LIBXML2 +struct bstrpool +{ + BSTR *pool; + unsigned int index; + unsigned int len; +}; + typedef struct _saxreader { IVBSAXXMLReader IVBSAXXMLReader_iface; @@ -64,6 +71,7 @@ typedef struct _saxreader struct IVBSAXDeclHandler *vbdeclHandler; xmlSAXHandler sax; BOOL isParsing; + struct bstrpool pool; } saxreader; typedef struct _saxlocator @@ -164,6 +172,45 @@ static int namespacePop(saxlocator *locator) return locator->nsStack[--locator->nsStackLast]; } +static BOOL bstr_pool_insert(struct bstrpool *pool, BSTR pool_entry) +{ + if (!pool->pool) + { + pool->pool = HeapAlloc(GetProcessHeap(), 0, 16 * sizeof(*pool->pool)); + if (!pool->pool) + return FALSE; + + pool->index = 0; + pool->len = 16; + } + else if (pool->index == pool->len) + { + BSTR *realloc = HeapReAlloc(GetProcessHeap(), 0, pool->pool, pool->len * 2 * sizeof(*realloc)); + + if (!realloc) + return FALSE; + + pool->pool = realloc; + pool->len *= 2; + } + + pool->pool[pool->index++] = pool_entry; + return TRUE; +} + +static void free_bstr_pool(struct bstrpool *pool) +{ + unsigned int i; + + for (i = 0; i < pool->index; i++) + SysFreeString(pool->pool[i]); + + HeapFree(GetProcessHeap(), 0, pool->pool); + + pool->pool = NULL; + pool->index = pool->len = 0; +} + static BSTR bstr_from_xmlCharN(const xmlChar *buf, int len) { DWORD dLen; @@ -200,6 +247,45 @@ static BSTR QName_from_xmlChar(const xmlChar *prefix, const xmlChar *name) return bstr; } +static BSTR pooled_bstr_from_xmlChar(struct bstrpool *pool, const xmlChar *buf) +{ + BSTR pool_entry = bstr_from_xmlChar(buf); + + if (pool_entry && !bstr_pool_insert(pool, pool_entry)) + { + SysFreeString(pool_entry); + return NULL; + } + + return pool_entry; +} + +static BSTR pooled_bstr_from_xmlCharN(struct bstrpool *pool, const xmlChar *buf, int len) +{ + BSTR pool_entry = bstr_from_xmlCharN(buf, len); + + if (pool_entry && !bstr_pool_insert(pool, pool_entry)) + { + SysFreeString(pool_entry); + return NULL; + } + + return pool_entry; +} + +static BSTR pooled_QName_from_xmlChar(struct bstrpool *pool, const xmlChar *prefix, const xmlChar *name) +{ + BSTR pool_entry = QName_from_xmlChar(prefix, name); + + if (pool_entry && !bstr_pool_insert(pool, pool_entry)) + { + SysFreeString(pool_entry); + return NULL; + } + + return pool_entry; +} + static void format_error_message_from_id(saxlocator *This, HRESULT hr) { xmlStopParser(This->pParserCtxt); @@ -1021,8 +1107,8 @@ static void libxmlStartElementNS( { for(index=0; index<nb_namespaces; index++) { - Prefix = bstr_from_xmlChar(namespaces[2*index]); - Uri = bstr_from_xmlChar(namespaces[2*index+1]); + Prefix = pooled_bstr_from_xmlChar(&This->saxreader->pool, namespaces[2*index]); + Uri = pooled_bstr_from_xmlChar(&This->saxreader->pool, namespaces[2*index+1]); if(This->vbInterface) hr = IVBSAXContentHandler_startPrefixMapping( @@ -1034,9 +1120,6 @@ static void libxmlStartElementNS( Prefix, SysStringLen(Prefix), Uri, SysStringLen(Uri)); - SysFreeString(Prefix); - SysFreeString(Uri); - if(hr != S_OK) { format_error_message_from_id(This, hr); @@ -1044,9 +1127,9 @@ static void libxmlStartElementNS( } } - NamespaceUri = bstr_from_xmlChar(URI); - LocalName = bstr_from_xmlChar(localname); - QName = QName_from_xmlChar(prefix, localname); + NamespaceUri = pooled_bstr_from_xmlChar(&This->saxreader->pool, URI); + LocalName = pooled_bstr_from_xmlChar(&This->saxreader->pool, localname); + QName = pooled_QName_from_xmlChar(&This->saxreader->pool, prefix, localname); hr = SAXAttributes_create(&attr, nb_namespaces, namespaces, nb_attributes, attributes); if(hr == S_OK) @@ -1061,10 +1144,6 @@ static void libxmlStartElementNS( ISAXAttributes_Release(&attr->ISAXAttributes_iface); } - - SysFreeString(NamespaceUri); - SysFreeString(LocalName); - SysFreeString(QName); } if(hr != S_OK) @@ -1094,9 +1173,9 @@ static void libxmlEndElementNS( if(has_content_handler(This)) { - NamespaceUri = bstr_from_xmlChar(URI); - LocalName = bstr_from_xmlChar(localname); - QName = QName_from_xmlChar(prefix, localname); + NamespaceUri = pooled_bstr_from_xmlChar(&This->saxreader->pool, URI); + LocalName = pooled_bstr_from_xmlChar(&This->saxreader->pool, localname); + QName = pooled_QName_from_xmlChar(&This->saxreader->pool, prefix, localname); if(This->vbInterface) hr = IVBSAXContentHandler_endElement( @@ -1109,10 +1188,6 @@ static void libxmlEndElementNS( LocalName, SysStringLen(LocalName), QName, SysStringLen(QName)); - SysFreeString(NamespaceUri); - SysFreeString(LocalName); - SysFreeString(QName); - if(hr != S_OK) { format_error_message_from_id(This, hr); @@ -1122,7 +1197,7 @@ static void libxmlEndElementNS( for(index=This->pParserCtxt->nsNr-2; index>=This->pParserCtxt->nsNr-nsNr*2; index-=2) { - Prefix = bstr_from_xmlChar(This->pParserCtxt->nsTab[index]); + Prefix = pooled_bstr_from_xmlChar(&This->saxreader->pool, This->pParserCtxt->nsTab[index]); if(This->vbInterface) hr = IVBSAXContentHandler_endPrefixMapping( @@ -1132,8 +1207,6 @@ static void libxmlEndElementNS( This->saxreader->contentHandler, Prefix, SysStringLen(Prefix)); - SysFreeString(Prefix); - if(hr != S_OK) { format_error_message_from_id(This, hr); @@ -1178,7 +1251,7 @@ static void libxmlCharacters( if(!lastEvent) *end = '\n'; - Chars = bstr_from_xmlCharN(cur, end-cur+1); + Chars = pooled_bstr_from_xmlCharN(&This->saxreader->pool, cur, end-cur+1); if(This->vbInterface) hr = IVBSAXContentHandler_characters( This->saxreader->vbcontentHandler, &Chars); @@ -1186,7 +1259,6 @@ static void libxmlCharacters( hr = ISAXContentHandler_characters( This->saxreader->contentHandler, Chars, SysStringLen(Chars)); - SysFreeString(Chars); if(hr != S_OK) { @@ -1251,7 +1323,7 @@ static void libxmlComment(void *ctx, const xmlChar *value) if(!This->vbInterface && !This->saxreader->lexicalHandler) return; if(This->vbInterface && !This->saxreader->vblexicalHandler) return; - bValue = bstr_from_xmlChar(value); + bValue = pooled_bstr_from_xmlChar(&This->saxreader->pool, value); if(This->vbInterface) hr = IVBSAXLexicalHandler_comment( @@ -1261,8 +1333,6 @@ static void libxmlComment(void *ctx, const xmlChar *value) This->saxreader->lexicalHandler, bValue, SysStringLen(bValue)); - SysFreeString(bValue); - if(FAILED(hr)) format_error_message_from_id(This, hr); @@ -1363,7 +1433,7 @@ static void libxmlCDataBlock(void *ctx, const xmlChar *value, int len) if(has_content_handler(This)) { - Chars = bstr_from_xmlCharN(cur, end-cur+1); + Chars = pooled_bstr_from_xmlCharN(&This->saxreader->pool, cur, end-cur+1); if(This->vbInterface) hr = IVBSAXContentHandler_characters( This->saxreader->vbcontentHandler, &Chars); @@ -1371,7 +1441,6 @@ static void libxmlCDataBlock(void *ctx, const xmlChar *value, int len) hr = ISAXContentHandler_characters( This->saxreader->contentHandler, Chars, SysStringLen(Chars)); - SysFreeString(Chars); } if(change) *end = '\r'; @@ -1998,6 +2067,9 @@ static HRESULT internal_parse( TRACE("(%p)->(%s)\n", This, debugstr_variant(&varInput)); + /* Dispose of the BSTRs in the pool from a prior run, if any. */ + free_bstr_pool(&This->pool); + switch(V_VT(&varInput)) { case VT_BSTR: @@ -2320,6 +2392,8 @@ static ULONG WINAPI saxxmlreader_Release( if(This->vbdeclHandler) IVBSAXDeclHandler_Release(This->vbdeclHandler); + free_bstr_pool(&This->pool); + heap_free( This ); } @@ -2817,6 +2891,9 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj) reader->declHandler = NULL; reader->vbdeclHandler = NULL; reader->isParsing = FALSE; + reader->pool.pool = NULL; + reader->pool.index = 0; + reader->pool.len = 0; memset(&reader->sax, 0, sizeof(xmlSAXHandler)); reader->sax.initialized = XML_SAX2_MAGIC;
1
0
0
0
Bernhard Loos : rpcrt4: Create pipes with FLAG_OVERLAPPED.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: d599813b744bb8933e221d8c2b8356e7ce3a1567 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d599813b744bb8933e221d8c2…
Author: Bernhard Loos <bernhardloos(a)googlemail.com> Date: Thu Jul 14 02:19:16 2011 +0200 rpcrt4: Create pipes with FLAG_OVERLAPPED. --- dlls/rpcrt4/rpc_transport.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 467c305..8f54575 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -163,7 +163,7 @@ static RPC_STATUS rpcrt4_conn_create_pipe(RpcConnection *Connection, LPCSTR pnam RpcConnection_np *npc = (RpcConnection_np *) Connection; TRACE("listening on %s\n", pname); - npc->pipe = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX, + npc->pipe = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, PIPE_UNLIMITED_INSTANCES, RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL);
1
0
0
0
Frédéric Delanoy : po: Update French translation.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: 760c1f1055c4b02d27f84fa9a51bd4af64538ae5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=760c1f1055c4b02d27f84fa9a…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Jul 15 11:47:44 2011 +0200 po: Update French translation. --- po/fr.po | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/po/fr.po b/po/fr.po index da48a0e..3161b35 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
http://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2011-06-15 21:15+0100\n" +"PO-Revision-Date: 2011-07-14 22:15+0100\n" "Last-Translator: Frédéric Delanoy <frederic.delanoy(a)gmail.com>\n" "Language-Team: none\n" "Language: French\n" @@ -168,7 +168,6 @@ msgid "System Path" msgstr "Chemin système (path)" #: comdlg32.rc:34 shell32.rc:153 winecfg.rc:119 winefile.rc:103 -#, fuzzy msgctxt "display name" msgid "Desktop" msgstr "Bureau" @@ -6385,14 +6384,13 @@ msgid "Properties" msgstr "Propriétés" #: shell32.rc:82 -#, fuzzy msgctxt "recycle bin" msgid "&Restore" msgstr "&Restaurer" #: shell32.rc:83 msgid "&Erase" -msgstr "" +msgstr "&Effacer" #: shell32.rc:95 msgid "E&xplore" @@ -6520,7 +6518,6 @@ msgid "My Videos" msgstr "Mes vidéos" #: shell32.rc:207 -#, fuzzy msgctxt "directory" msgid "Desktop" msgstr "Bureau" @@ -6875,7 +6872,6 @@ msgid " sec" msgstr " s" #: user32.rc:27 user32.rc:40 taskmgr.rc:138 -#, fuzzy msgctxt "window" msgid "&Restore" msgstr "&Restaurer"
1
0
0
0
Hwang YunSong : po: Updated Korean translation.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: 5846ba142bd40abf52da23571c7165c3362e8e77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5846ba142bd40abf52da23571…
Author: Hwang YunSong <hys545(a)dreamwiz.com> Date: Fri Jul 15 11:28:03 2011 +0900 po: Updated Korean translation. --- po/ko.po | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/po/ko.po b/po/ko.po index 72fa63e..bef4078 100644 --- a/po/ko.po +++ b/po/ko.po @@ -168,10 +168,9 @@ msgid "System Path" msgstr "시스템 경로" #: comdlg32.rc:34 shell32.rc:153 winecfg.rc:119 winefile.rc:103 -#, fuzzy msgctxt "display name" msgid "Desktop" -msgstr "데스크탑" +msgstr "바탕화면" #: comdlg32.rc:35 winhlp32.rc:46 winhlp32.rc:67 msgid "Fonts" @@ -6358,10 +6357,9 @@ msgid "Properties" msgstr "속성" #: shell32.rc:82 -#, fuzzy msgctxt "recycle bin" msgid "&Restore" -msgstr "복구(&R)" +msgstr "복원(&R)" #: shell32.rc:83 msgid "&Erase" @@ -6493,10 +6491,9 @@ msgid "My Videos" msgstr "내 비디오" #: shell32.rc:207 -#, fuzzy msgctxt "directory" msgid "Desktop" -msgstr "데스크탑" +msgstr "바탕화면" #: shell32.rc:208 msgid "NetHood" @@ -6592,7 +6589,7 @@ msgstr "Music\\Playlists" #: shell32.rc:231 shell32.rc:244 msgid "Downloads" -msgstr "Downloads" +msgstr "다운로드" #: shell32.rc:148 taskmgr.rc:326 msgid "Status" @@ -6600,7 +6597,7 @@ msgstr "상태" #: shell32.rc:149 msgid "Location" -msgstr "랜 연결" +msgstr "위치" #: shell32.rc:150 msgid "Model" @@ -6840,10 +6837,9 @@ msgid " sec" msgstr "초" #: user32.rc:27 user32.rc:40 taskmgr.rc:138 -#, fuzzy msgctxt "window" msgid "&Restore" -msgstr "복구(&R)" +msgstr "복원(&R)" #: user32.rc:28 user32.rc:41 msgid "&Move"
1
0
0
0
Michael Mc Donnell : d3dx9: Implemented ConvertAdjacencyToPointReps mesh method.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: ea5ed35edfa56d1259edebe9a74af00b29906789 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ea5ed35edfa56d1259edebe9a…
Author: Michael Mc Donnell <michael(a)mcdonnell.dk> Date: Tue Jun 7 22:37:42 2011 +0200 d3dx9: Implemented ConvertAdjacencyToPointReps mesh method. --- dlls/d3dx9_36/mesh.c | 161 +++++++++++++++++++++++++++++++++++++++++++- dlls/d3dx9_36/tests/mesh.c | 18 +++--- 2 files changed, 168 insertions(+), 11 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index dfe6a35..717c356 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -441,13 +441,170 @@ static HRESULT WINAPI ID3DXMeshImpl_ConvertPointRepsToAdjacency(ID3DXMesh *iface return E_NOTIMPL; } +/* ConvertAdjacencyToPointReps helper function. + * + * Goes around the edges of each face and replaces the vertices in any adjacent + * face's edge with its own vertices(if its vertices have a lower index). This + * way as few as possible low index vertices are shared among the faces. The + * re-ordered index buffer is stored in new_indices. + * + * The vertices in a point representation must be ordered sequentially, e.g. + * index 5 holds the index of the vertex that replaces vertex 5, i.e. if + * vertex 5 is replaced by vertex 3 then index 5 would contain 3. If no vertex + * replaces it, then it contains the same number as the index itself, e.g. + * index 5 would contain 5. */ +static HRESULT propagate_face_vertices(CONST DWORD *adjacency, DWORD *point_reps, + CONST DWORD *indices, DWORD *new_indices, + CONST DWORD face, CONST DWORD numfaces) +{ + const unsigned int VERTS_PER_FACE = 3; + DWORD edge, opp_edge; + DWORD face_base = VERTS_PER_FACE * face; + + for (edge = 0; edge < VERTS_PER_FACE; edge++) + { + DWORD adj_face = adjacency[face_base + edge]; + DWORD adj_face_base; + DWORD i,j; + if (adj_face == -1) /* No adjacent face. */ + continue; + else if (adj_face >= numfaces) + { + /* This throws exception on Windows */ + WARN("Index out of bounds. Got %d expected less than %d.\n", + adj_face, numfaces); + return D3DERR_INVALIDCALL; + } + adj_face_base = 3 * adj_face; + + /* Find opposite edge in adjacent face. */ + for (opp_edge = 0; opp_edge < VERTS_PER_FACE; opp_edge++) + { + DWORD opp_edge_index = adj_face_base + opp_edge; + if (adjacency[opp_edge_index] == face) + break; /* Found opposite edge. */ + } + + /* Replaces vertices in opposite edge with vertices from current edge. */ + for (i = 0, j = 1; i < 2 && (j+1) > 0; i++, j--) + { + DWORD from = face_base + (edge + j) % VERTS_PER_FACE; + DWORD to = adj_face_base + (opp_edge + i) % VERTS_PER_FACE; + + /* Propagate lowest index. */ + if (new_indices[to] > new_indices[from]) + { + new_indices[to] = new_indices[from]; + point_reps[indices[to]] = new_indices[from]; + } + } + } + + return D3D_OK; +} + static HRESULT WINAPI ID3DXMeshImpl_ConvertAdjacencyToPointReps(ID3DXMesh *iface, CONST DWORD *adjacency, DWORD *point_reps) { + HRESULT hr; + DWORD face; + DWORD i; + DWORD *indices = NULL; + WORD *indices_16bit = NULL; + DWORD *new_indices = NULL; + const unsigned int VERTS_PER_FACE = 3; + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); - FIXME("(%p)->(%p,%p): stub\n", This, adjacency, point_reps); + TRACE("(%p)->(%p,%p)\n", This, adjacency, point_reps); - return E_NOTIMPL; + if (!adjacency) + { + WARN("NULL adjacency.\n"); + hr = D3DERR_INVALIDCALL; + goto cleanup; + } + + if (!point_reps) + { + WARN("NULL point_reps.\n"); + hr = D3DERR_INVALIDCALL; + goto cleanup; + } + + /* Should never happen as CreateMesh does not allow meshes with 0 faces */ + if (This->numfaces == 0) + { + ERR("Number of faces was zero."); + hr = D3DERR_INVALIDCALL; + goto cleanup; + } + + new_indices = HeapAlloc(GetProcessHeap(), 0, VERTS_PER_FACE * This->numfaces * sizeof(*indices)); + if (!new_indices) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + if (This->options & D3DXMESH_32BIT) + { + hr = iface->lpVtbl->LockIndexBuffer(iface, D3DLOCK_READONLY, (void**)&indices); + if (FAILED(hr)) goto cleanup; + memcpy(new_indices, indices, VERTS_PER_FACE * This->numfaces * sizeof(*indices)); + } + else + { + /* Make a widening copy of indices_16bit into indices and new_indices + * in order to re-use the helper function */ + hr = iface->lpVtbl->LockIndexBuffer(iface, D3DLOCK_READONLY, (void**)&indices_16bit); + if (FAILED(hr)) goto cleanup; + indices = HeapAlloc(GetProcessHeap(), 0, VERTS_PER_FACE * This->numfaces * sizeof(*indices)); + if (!indices) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + for (i = 0; i < VERTS_PER_FACE * This->numfaces; i++) + { + new_indices[i] = indices_16bit[i]; + indices[i] = indices_16bit[i]; + } + } + + /* Vertices are ordered sequentially in the point representation. */ + for (i = 0; i < This->numvertices; i++) + { + point_reps[i] = i; + } + + /* Propagate vertices with low indices so as few vertices as possible + * are used in the mesh. + */ + for (face = 0; face < This->numfaces; face++) + { + hr = propagate_face_vertices(adjacency, point_reps, indices, new_indices, face, This->numfaces); + if (FAILED(hr)) goto cleanup; + } + /* Go in opposite direction to catch all face orderings */ + for (face = This->numfaces - 1; face + 1 > 0; face--) + { + hr = propagate_face_vertices(adjacency, point_reps, indices, new_indices, face, This->numfaces); + if (FAILED(hr)) goto cleanup; + } + + hr = D3D_OK; +cleanup: + if (This->options & D3DXMESH_32BIT) + { + if (indices) iface->lpVtbl->UnlockIndexBuffer(iface); + } + else + { + if (indices_16bit) iface->lpVtbl->UnlockIndexBuffer(iface); + HeapFree(GetProcessHeap(), 0, indices); + } + HeapFree(GetProcessHeap(), 0, new_indices); + return hr; } struct vertex_metadata { diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index b3aed39..6522ff1 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -5386,16 +5386,16 @@ static void test_convert_adjacency_to_point_reps(void) /* Convert adjacency to point representation */ memset(point_reps, -1, tc[i].num_vertices * sizeof(*point_reps)); hr = mesh->lpVtbl->ConvertAdjacencyToPointReps(mesh, tc[i].adjacency, point_reps); - todo_wine ok(hr == D3D_OK, "ConvertAdjacencyToPointReps failed case %d. " + ok(hr == D3D_OK, "ConvertAdjacencyToPointReps failed case %d. " "Got %x expected D3D_OK\n", i, hr); /* Check point representation */ for (j = 0; j < tc[i].num_vertices; j++) { - todo_wine ok(point_reps[j] == tc[i].exp_point_reps[j], - "Unexpected point representation at (%d, %d)." - " Got %d expected %d\n", - i, j, point_reps[j], tc[i].exp_point_reps[j]); + ok(point_reps[j] == tc[i].exp_point_reps[j], + "Unexpected point representation at (%d, %d)." + " Got %d expected %d\n", + i, j, point_reps[j], tc[i].exp_point_reps[j]); } HeapFree(GetProcessHeap(), 0, point_reps); @@ -5406,11 +5406,11 @@ static void test_convert_adjacency_to_point_reps(void) /* NULL checks */ hr = mesh_null_check->lpVtbl->ConvertAdjacencyToPointReps(mesh_null_check, tc[0].adjacency, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "ConvertAdjacencyToPointReps point_reps NULL. " - "Got %x expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "ConvertAdjacencyToPointReps point_reps NULL. " + "Got %x expected D3DERR_INVALIDCALL\n", hr); hr = mesh_null_check->lpVtbl->ConvertAdjacencyToPointReps(mesh_null_check, NULL, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "ConvertAdjacencyToPointReps adjacency and point_reps NULL. " - "Got %x expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "ConvertAdjacencyToPointReps adjacency and point_reps NULL. " + "Got %x expected D3DERR_INVALIDCALL\n", hr); cleanup: if (mesh_null_check)
1
0
0
0
Michael Mc Donnell : d3dx9/tests: Implemented ConvertAdjacencyToPointReps test.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: 7a1b18a742cd9058db03b01d3c8b341ae4777e0c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a1b18a742cd9058db03b01d3…
Author: Michael Mc Donnell <michael(a)mcdonnell.dk> Date: Fri May 27 16:24:18 2011 +0200 d3dx9/tests: Implemented ConvertAdjacencyToPointReps test. --- dlls/d3dx9_36/tests/mesh.c | 516 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 516 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7a1b18a742cd9058db03b…
1
0
0
0
Lucas Fialho Zawacki : dinput: Using DIDFT_GETTYPE in EnumObjects instead of DIEFT_GETTYPE.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: efdad2c1ce14b5b68a8a61a71832595a1fc6702f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=efdad2c1ce14b5b68a8a61a71…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Thu Jul 14 16:25:03 2011 -0300 dinput: Using DIDFT_GETTYPE in EnumObjects instead of DIEFT_GETTYPE. --- dlls/dinput/device.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 5d81227..22632ea 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -888,7 +888,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_EnumObjects(LPDIRECTINPUTDEVICE8A iface, { LPDIOBJECTDATAFORMAT odf = dataformat_to_odf(This->data_format.wine_df, i); - if (dwFlags != DIDFT_ALL && !(dwFlags & DIEFT_GETTYPE(odf->dwType))) continue; + if (dwFlags != DIDFT_ALL && !(dwFlags & DIDFT_GETTYPE(odf->dwType))) continue; if (IDirectInputDevice_GetObjectInfo(iface, &ddoi, odf->dwType, DIPH_BYID) != DI_OK) continue; @@ -918,7 +918,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_EnumObjects(LPDIRECTINPUTDEVICE8W iface, { LPDIOBJECTDATAFORMAT odf = dataformat_to_odf(This->data_format.wine_df, i); - if (dwFlags != DIDFT_ALL && !(dwFlags & DIEFT_GETTYPE(odf->dwType))) continue; + if (dwFlags != DIDFT_ALL && !(dwFlags & DIDFT_GETTYPE(odf->dwType))) continue; if (IDirectInputDevice_GetObjectInfo(iface, &ddoi, odf->dwType, DIPH_BYID) != DI_OK) continue;
1
0
0
0
Lucas Fialho Zawacki : dinput/tests: Tests for EnumObjects with different types of device objects.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: d1a6d70e89275bfba436a99662ea078f0bcfc929 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1a6d70e89275bfba436a9966…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Thu Jul 14 16:24:17 2011 -0300 dinput/tests: Tests for EnumObjects with different types of device objects. --- dlls/dinput/tests/device.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/dinput/tests/device.c b/dlls/dinput/tests/device.c index ea25482..e79c564 100644 --- a/dlls/dinput/tests/device.c +++ b/dlls/dinput/tests/device.c @@ -64,11 +64,20 @@ static BOOL CALLBACK enum_callback(LPCDIDEVICEOBJECTINSTANCE oi, LPVOID info) return DIENUM_CONTINUE; } +static BOOL CALLBACK enum_type_callback(LPCDIDEVICEOBJECTINSTANCE oi, LPVOID info) +{ + DWORD expected = *(DWORD*)info; + ok (expected & DIDFT_GETTYPE(oi->dwType), "EnumObjects() enumerated wrong type for obj %s, expected: %08x got: %08x\n", oi->tszName, expected, oi->dwType); + return DIENUM_CONTINUE; +} + static void test_object_info(LPDIRECTINPUTDEVICE device, HWND hwnd) { HRESULT hr; DIPROPDWORD dp; DIDEVICEOBJECTINSTANCE obj_info; + DWORD obj_types[] = {DIDFT_BUTTON, DIDFT_AXIS, DIDFT_POV}; + int type_index; int cnt = 0, cnt1 = 0; hr = IDirectInputDevice_EnumObjects(device, enum_callback, &cnt, DIDFT_ALL); @@ -82,6 +91,13 @@ static void test_object_info(LPDIRECTINPUTDEVICE device, HWND hwnd) if (0) /* fails for joystick only */ ok(cnt == cnt1, "Enum count changed from %d to %d\n", cnt, cnt1); + /* Testing EnumObjects with different types of device objects */ + for (type_index=0; type_index < sizeof(obj_types)/sizeof(obj_types[0]); type_index++) + { + hr = IDirectInputDevice_EnumObjects(device, enum_type_callback, &obj_types[type_index], obj_types[type_index]); + ok(SUCCEEDED(hr), "EnumObjects() failed: %08x\n", hr); + } + /* No need to test devices without axis */ obj_info.dwSize = sizeof(obj_info); hr = IDirectInputDevice_GetObjectInfo(device, &obj_info, 16, DIPH_BYOFFSET);
1
0
0
0
Jacek Caban : dxgi.idl: Added IDXGIResource, IDXGIAdapter1 and IDXGIFactory1 declarations.
by Alexandre Julliard
15 Jul '11
15 Jul '11
Module: wine Branch: master Commit: 58bcc0ae440fe451db77dffce68a4aff7f8019c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58bcc0ae440fe451db77dffce…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 15 12:07:53 2011 +0200 dxgi.idl: Added IDXGIResource, IDXGIAdapter1 and IDXGIFactory1 declarations. --- include/dxgi.idl | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/include/dxgi.idl b/include/dxgi.idl index 0559769..e74b525 100644 --- a/include/dxgi.idl +++ b/include/dxgi.idl @@ -178,6 +178,20 @@ interface IDXGIDeviceSubObject : IDXGIObject [ object, + uuid(035f3ab4-482e-4e50-b41f-8a7f8bd8960b), + local, + pointer_default(unique) +] +interface IDXGIResource : IDXGIDeviceSubObject +{ + HRESULT GetSharedHandle([out] HANDLE *pSharedHandle); + HRESULT GetUsage([out] DXGI_USAGE *pUsage); + HRESULT SetEvictionPriority([in] UINT EvictionPriority); + HRESULT GetEvictionPriority([out, retval] UINT *pEvictionPriority); +} + +[ + object, local, uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec) ] @@ -376,3 +390,45 @@ interface IDXGIDevice : IDXGIObject [out] INT *priority ); } + +typedef enum DXGI_ADAPTER_FLAG { + DXGI_ADAPTER_FLAG_NONE = 0, + DXGI_ADAPTER_FLAG_REMOTE = 1, + DXGI_ADAPTER_FLAG_FORCE_DWORD = 0xFFFFFFFF +} DXGI_ADAPTER_FLAG; + +typedef struct DXGI_ADAPTER_DESC1 { + WCHAR Description[128]; + UINT VendorId; + UINT DeviceId; + UINT SubSysId; + UINT Revision; + SIZE_T DedicatedVideoMemory; + SIZE_T DedicatedSystemMemory; + SIZE_T SharedSystemMemory; + LUID AdapterLuid; + UINT Flags; +} DXGI_ADAPTER_DESC1; + +[ + object, + uuid(29038f61-3839-4626-91fd-086879011a05), + local, + pointer_default(unique) +] +interface IDXGIAdapter1 : IDXGIAdapter +{ + HRESULT GetDesc1([out] DXGI_ADAPTER_DESC1 *pDesc); +} + +[ + object, + uuid(770aae78-f26f-4dba-a829-253c83d1b387), + local, + pointer_default(unique) + ] +interface IDXGIFactory1 : IDXGIFactory +{ + HRESULT EnumAdapters1([in] UINT Adapter, [out] IDXGIAdapter1 **ppAdapter); + BOOL IsCurrent(); +}
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
84
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
Results per page:
10
25
50
100
200