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
March
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
October 2012
----- 2025 -----
March 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
960 discussions
Start a n
N
ew thread
Jason Edmeades : cmd: Identify the program name using more appropriate parsing.
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 4236c2007df8267b4bbfdc00f5f26e86f71ddc99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4236c2007df8267b4bbfdc00f…
Author: Jason Edmeades <jason(a)edmeades.me.uk> Date: Sat Oct 13 22:11:03 2012 +0100 cmd: Identify the program name using more appropriate parsing. --- programs/cmd/tests/test_cmdline.cmd.exp | 32 +++++++++++++++--------------- programs/cmd/wcmdmain.c | 23 +++++++++------------ 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/programs/cmd/tests/test_cmdline.cmd.exp b/programs/cmd/tests/test_cmdline.cmd.exp index 61deff6..4ea4ce0 100644 --- a/programs/cmd/tests/test_cmdline.cmd.exp +++ b/programs/cmd/tests/test_cmdline.cmd.exp @@ -48,37 +48,37 @@ var=33@space@ ------ Testing invocation of batch files ---------- 0@space@ 1@space@ -@todo_wine@1@space@ 1@space@ -@todo_wine@1@space@ +1@space@ +1@space@ 0@space@ -@todo_wine@1@space@ -@todo_wine@2@space@ +1@space@ +2@space@ 0@space@ 3@space@ -@todo_wine@3@space@ +3@space@ @todo_wine@4@space@ ------ Testing invocation with CMD /C ------------- 0@space@ 1@space@ -@todo_wine@0@space@ 0@space@ -@todo_wine@1@space@ 0@space@ -@todo_wine@1@space@ -@todo_wine@2@space@ +1@space@ +0@space@ +1@space@ +2@space@ 0@space@ -@todo_wine@3@space@ +3@space@ @todo_wine@4@space@ ---------- Testing CMD /C quoting ----------------- "hi" -@todo_wine@1@space@ +1@space@ "\"\\"\\\"\\\\"@space@"\"\\"\\\"\\\\" 1@space@ 0@space@ 1@space@ 0@space@ -@todo_wine@0@space@ +0@space@ 0@space@@or_broken@3@space@ 3@space@ 2@space@ @@ -100,7 +100,7 @@ THIS FAILS: cmd ignoreme/c say one {@space@ }@space@ 0@space@ -@todo_wine@0@space@ +0@space@ !@space@ @todo_wine@0@space@@or_broken@!@space@ @todo_wine@0@space@ @@ -117,8 +117,8 @@ THIS FAILS: cmd ignoreme/c say one @todo_wine@1:((1)),2:@space@ @todo_wine@1:(1)(2),2:@space@ @todo_wine@1:(1),2:(2)@space@ -@todo_wine@1:1,2:2@space@ -@todo_wine@1:1,2:2@space@ -@todo_wine@1:1,2:2@space@ +1:1,2:2@space@ +1:1,2:2@space@ +1:1,2:2@space@ 1:"p@space@"1,2:p"@space@"2@space@ 1:p"1@space@p",2:2@space@ diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 2aa116c..eb0897a 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1008,6 +1008,7 @@ void WCMD_run_program (WCHAR *command, BOOL called) MAX_PATH, including null character */ WCHAR *lastSlash; WCHAR pathext[MAXSTRING]; + WCHAR *firstParam; BOOL extensionsupplied = FALSE; BOOL launched = FALSE; BOOL status; @@ -1016,17 +1017,13 @@ void WCMD_run_program (WCHAR *command, BOOL called) static const WCHAR envPath[] = {'P','A','T','H','\0'}; static const WCHAR delims[] = {'/','\\',':','\0'}; - /* Quick way to get the filename - * (but handle leading / as part of program name, not qualifier) - */ - for (len = 0; command[len] == '/'; len++) param1[len] = '/'; - WCMD_parse (command + len, quals, param1 + len, param2); - - if (!(*param1) && !(*param2)) - return; + /* Quick way to get the filename is to extract the first argument. */ + WINE_TRACE("Running '%s' (%d)\n", wine_dbgstr_w(command), called); + firstParam = WCMD_parameter(command, 0, NULL, NULL, FALSE); + if (!firstParam) return; /* Calculate the search path and stem to search for */ - if (strpbrkW (param1, delims) == NULL) { /* No explicit path given, search path */ + if (strpbrkW (firstParam, delims) == NULL) { /* No explicit path given, search path */ static const WCHAR curDir[] = {'.',';','\0'}; strcpyW(pathtosearch, curDir); len = GetEnvironmentVariableW(envPath, &pathtosearch[2], (sizeof(pathtosearch)/sizeof(WCHAR))-2); @@ -1034,19 +1031,19 @@ void WCMD_run_program (WCHAR *command, BOOL called) static const WCHAR curDir[] = {'.','\0'}; strcpyW (pathtosearch, curDir); } - if (strchrW(param1, '.') != NULL) extensionsupplied = TRUE; - if (strlenW(param1) >= MAX_PATH) + if (strchrW(firstParam, '.') != NULL) extensionsupplied = TRUE; + if (strlenW(firstParam) >= MAX_PATH) { WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_LINETOOLONG)); return; } - strcpyW(stemofsearch, param1); + strcpyW(stemofsearch, firstParam); } else { /* Convert eg. ..\fred to include a directory by removing file part */ - GetFullPathNameW(param1, sizeof(pathtosearch)/sizeof(WCHAR), pathtosearch, NULL); + GetFullPathNameW(firstParam, sizeof(pathtosearch)/sizeof(WCHAR), pathtosearch, NULL); lastSlash = strrchrW(pathtosearch, '\\'); if (lastSlash && strchrW(lastSlash, '.') != NULL) extensionsupplied = TRUE; strcpyW(stemofsearch, lastSlash+1);
1
0
0
0
Jason Edmeades : cmd: cmd /c "pgmname" searches all extensions on PATHEXT.
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 25cf0aa04665e4916c07f134b39c85c0bd4fa80d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=25cf0aa04665e4916c07f134b…
Author: Jason Edmeades <jason(a)edmeades.me.uk> Date: Sat Oct 13 21:50:22 2012 +0100 cmd: cmd /c "pgmname" searches all extensions on PATHEXT. --- programs/cmd/tests/test_cmdline.cmd.exp | 8 ++-- programs/cmd/wcmdmain.c | 81 ++++++++++++++++++++----------- 2 files changed, 57 insertions(+), 32 deletions(-) diff --git a/programs/cmd/tests/test_cmdline.cmd.exp b/programs/cmd/tests/test_cmdline.cmd.exp index 7e9ac32..61deff6 100644 --- a/programs/cmd/tests/test_cmdline.cmd.exp +++ b/programs/cmd/tests/test_cmdline.cmd.exp @@ -60,7 +60,7 @@ var=33@space@ @todo_wine@4@space@ ------ Testing invocation with CMD /C ------------- 0@space@ -@todo_wine@1@space@ +1@space@ @todo_wine@0@space@ 0@space@ @todo_wine@1@space@ @@ -74,7 +74,7 @@ var=33@space@ "hi" @todo_wine@1@space@ "\"\\"\\\"\\\\"@space@"\"\\"\\\"\\\\" -@todo_wine@1@space@ +1@space@ 0@space@ 1@space@ 0@space@ @@ -85,10 +85,10 @@ var=33@space@ 2@space@ 2@space@ 0@space@ -@todo_wine@5@space@ +5@space@ ------- Testing CMD /C qualifier treatment ------------ 0@space@ -@todo_wine@1@space@ +1@space@ THIS FAILS: cmd "/c"say one THIS FAILS: cmd ignoreme/c say one --------- Testing special characters -------------- diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 7cd6bda..2aa116c 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -47,6 +47,11 @@ BOOL echo_mode = TRUE; WCHAR anykey[100], version_string[100]; const WCHAR newlineW[] = {'\r','\n','\0'}; const WCHAR spaceW[] = {' ','\0'}; +static const WCHAR envPathExt[] = {'P','A','T','H','E','X','T','\0'}; +static const WCHAR dfltPathExt[] = {'.','b','a','t',';', + '.','c','o','m',';', + '.','c','m','d',';', + '.','e','x','e','\0'}; static BOOL opt_c, opt_k, opt_s, unicodeOutput = FALSE; @@ -1009,7 +1014,6 @@ void WCMD_run_program (WCHAR *command, BOOL called) BOOL assumeInternal = FALSE; DWORD len; static const WCHAR envPath[] = {'P','A','T','H','\0'}; - static const WCHAR envPathExt[] = {'P','A','T','H','E','X','T','\0'}; static const WCHAR delims[] = {'/','\\',':','\0'}; /* Quick way to get the filename @@ -1055,10 +1059,6 @@ void WCMD_run_program (WCHAR *command, BOOL called) /* Now extract PATHEXT */ len = GetEnvironmentVariableW(envPathExt, pathext, sizeof(pathext)/sizeof(WCHAR)); if ((len == 0) || (len >= (sizeof(pathext)/sizeof(WCHAR)))) { - static const WCHAR dfltPathExt[] = {'.','b','a','t',';', - '.','c','o','m',';', - '.','c','m','d',';', - '.','e','x','e','\0'}; strcpyW (pathext, dfltPathExt); } @@ -2445,10 +2445,15 @@ int wmain (int argc, WCHAR *argvW[]) is a valid executable, ie must exist, otherwise drop back to old mode */ if (!opt_s) { WCHAR *thisArg = WCMD_parameter(cmd, 0, NULL, NULL, FALSE); - static const WCHAR extEXEW[] = {'.','e','x','e','\0'}; - static const WCHAR extCOMW[] = {'.','c','o','m','\0'}; + WCHAR pathext[MAXSTRING]; BOOL found = FALSE; + /* Now extract PATHEXT */ + len = GetEnvironmentVariableW(envPathExt, pathext, sizeof(pathext)/sizeof(WCHAR)); + if ((len == 0) || (len >= (sizeof(pathext)/sizeof(WCHAR)))) { + strcpyW (pathext, dfltPathExt); + } + /* If the supplied parameter has any directory information, look there */ WINE_TRACE("First parameter is '%s'\n", wine_dbgstr_w(thisArg)); if (strchrW(thisArg, '\\') != NULL) { @@ -2461,18 +2466,28 @@ int wmain (int argc, WCHAR *argvW[]) if (GetFileAttributesW(string) != INVALID_FILE_ATTRIBUTES) { WINE_TRACE("Found file as '%s'\n", wine_dbgstr_w(string)); found = TRUE; - } else strcpyW(p, extEXEW); - - /* Does file exist with .exe appended */ - if (!found && GetFileAttributesW(string) != INVALID_FILE_ATTRIBUTES) { - WINE_TRACE("Found file as '%s'\n", wine_dbgstr_w(string)); - found = TRUE; - } else strcpyW(p, extCOMW); + } else { + WCHAR *thisExt = pathext; + + /* No - try with each of the PATHEXT extensions */ + while (!found && thisExt) { + WCHAR *nextExt = strchrW(thisExt, ';'); + + if (nextExt) { + memcpy(p, thisExt, (nextExt-thisExt) * sizeof(WCHAR)); + p[(nextExt-thisExt)] = 0x00; + thisExt = nextExt+1; + } else { + strcpyW(p, thisExt); + thisExt = NULL; + } - /* Does file exist with .com appended */ - if (!found && GetFileAttributesW(string) != INVALID_FILE_ATTRIBUTES) { - WINE_TRACE("Found file as '%s'\n", wine_dbgstr_w(string)); - found = TRUE; + /* Does file exist with this extension appended? */ + if (GetFileAttributesW(string) != INVALID_FILE_ATTRIBUTES) { + WINE_TRACE("Found file as '%s'\n", wine_dbgstr_w(string)); + found = TRUE; + } + } } /* Otherwise we now need to look in the path to see if we can find it */ @@ -2483,18 +2498,28 @@ int wmain (int argc, WCHAR *argvW[]) if (SearchPathW(NULL, thisArg, NULL, sizeof(string)/sizeof(WCHAR), string, NULL) != 0) { WINE_TRACE("Found on path as '%s'\n", wine_dbgstr_w(string)); found = TRUE; - } + } else { + WCHAR *thisExt = pathext; - /* Does file exist plus an extension of .exe? */ - if (SearchPathW(NULL, thisArg, extEXEW, sizeof(string)/sizeof(WCHAR), string, NULL) != 0) { - WINE_TRACE("Found on path as '%s'\n", wine_dbgstr_w(string)); - found = TRUE; - } + /* No - try with each of the PATHEXT extensions */ + while (!found && thisExt) { + WCHAR *nextExt = strchrW(thisExt, ';'); - /* Does file exist plus an extension of .com? */ - if (SearchPathW(NULL, thisArg, extCOMW, sizeof(string)/sizeof(WCHAR), string, NULL) != 0) { - WINE_TRACE("Found on path as '%s'\n", wine_dbgstr_w(string)); - found = TRUE; + if (nextExt) { + *nextExt = 0; + nextExt = nextExt+1; + } else { + nextExt = NULL; + } + + /* Does file exist with this extension? */ + if (SearchPathW(NULL, thisArg, thisExt, sizeof(string)/sizeof(WCHAR), string, NULL) != 0) { + WINE_TRACE("Found on path as '%s' with extension '%s'\n", wine_dbgstr_w(string), + wine_dbgstr_w(thisExt)); + found = TRUE; + } + thisExt = nextExt; + } } }
1
0
0
0
Daniel Jelinski : comctl32/tests: Expanding/ collapsing a node always sends associated messages.
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 50bdb257f9dd8184c86cbf9e196254ba1f5d3772 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50bdb257f9dd8184c86cbf9e1…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Fri Oct 12 23:30:05 2012 +0200 comctl32/tests: Expanding/collapsing a node always sends associated messages. --- dlls/comctl32/tests/treeview.c | 45 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 43 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index c60ed4d..2fe468b 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -212,6 +212,13 @@ static const struct message parent_expand_kb_seq[] = { { 0 } }; +static const struct message parent_collapse_2nd_kb_seq[] = { + { WM_NOTIFY, sent|id|optional, 0, 0, TVN_KEYDOWN }, + { WM_NOTIFY, sent|id, 0, 0, TVN_ITEMEXPANDINGA }, + { WM_CHANGEUISTATE, sent|optional }, + { 0 } +}; + static const struct message parent_expand_empty_kb_seq[] = { { WM_NOTIFY, sent|id|optional, 0, 0, TVN_KEYDOWN }, { WM_CHANGEUISTATE, sent|optional }, @@ -1082,8 +1089,6 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam, ok(pTreeView->itemNew.mask == (TVIF_HANDLE | TVIF_SELECTEDIMAGE | TVIF_IMAGE | TVIF_PARAM | TVIF_STATE), "got wrong mask %x\n", pTreeView->itemNew.mask); - ok((pTreeView->itemNew.state & TVIS_EXPANDED) == 0, - "got wrong state %x\n", pTreeView->itemNew.state); ok(pTreeView->itemOld.mask == 0, "got wrong mask %x\n", pTreeView->itemOld.mask); @@ -1473,6 +1478,42 @@ static void test_expandnotify(void) ret = SendMessageA(hTree, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hRoot); expect(TRUE, ret); + g_get_from_expand = TRUE; + flush_sequences(sequences, NUM_MSG_SEQUENCES); + ret = SendMessageA(hTree, WM_KEYDOWN, VK_ADD, 0); + expect(FALSE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, parent_expand_kb_seq, "expand node", FALSE); + ok(g_item_expanding.state == TVIS_SELECTED, "got state on TVN_ITEMEXPANDING 0x%08x\n", + g_item_expanding.state); + ok(g_item_expanded.state == (TVIS_SELECTED|TVIS_EXPANDED), "got state on TVN_ITEMEXPANDED 0x%08x\n", + g_item_expanded.state); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + ret = SendMessageA(hTree, WM_KEYDOWN, VK_ADD, 0); + expect(FALSE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, parent_expand_kb_seq, "expand node again", FALSE); + ok(g_item_expanding.state == (TVIS_SELECTED|TVIS_EXPANDED|TVIS_EXPANDEDONCE), "got state on TVN_ITEMEXPANDING 0x%08x\n", + g_item_expanding.state); + ok(g_item_expanded.state == (TVIS_SELECTED|TVIS_EXPANDED|TVIS_EXPANDEDONCE), "got state on TVN_ITEMEXPANDED 0x%08x\n", + g_item_expanded.state); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + ret = SendMessageA(hTree, WM_KEYDOWN, VK_SUBTRACT, 0); + expect(FALSE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, parent_expand_kb_seq, "collapse node", FALSE); + ok(g_item_expanding.state == (TVIS_SELECTED|TVIS_EXPANDED|TVIS_EXPANDEDONCE), "got state on TVN_ITEMEXPANDING 0x%08x\n", + g_item_expanding.state); + ok(g_item_expanded.state == (TVIS_SELECTED|TVIS_EXPANDEDONCE), "got state on TVN_ITEMEXPANDED 0x%08x\n", + g_item_expanded.state); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + ret = SendMessageA(hTree, WM_KEYDOWN, VK_SUBTRACT, 0); + expect(FALSE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, parent_collapse_2nd_kb_seq, "collapse node again", FALSE); + ok(g_item_expanding.state == (TVIS_SELECTED|TVIS_EXPANDEDONCE), "got state on TVN_ITEMEXPANDING 0x%08x\n", + g_item_expanding.state); + g_get_from_expand = FALSE; + flush_sequences(sequences, NUM_MSG_SEQUENCES); ret = SendMessageA(hTree, WM_KEYDOWN, VK_ADD, 0); expect(FALSE, ret);
1
0
0
0
Daniel Jelinski : comctl32: Fix notifications and return value when collapsing already collapsed node.
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 0b6cf6e46a02085ae97f943f9c2ce2db9a0a0caf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b6cf6e46a02085ae97f943f9…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Fri Oct 12 22:50:23 2012 +0200 comctl32: Fix notifications and return value when collapsing already collapsed node. --- dlls/comctl32/tests/treeview.c | 2 +- dlls/comctl32/treeview.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 1021648..c60ed4d 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -1395,7 +1395,7 @@ static void test_expandnotify(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); ret = SendMessageA(hTree, TVM_EXPAND, TVE_COLLAPSE, (LPARAM)hRoot); - todo_wine expect(FALSE, ret); + expect(FALSE, ret); ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "no collapse notifications", FALSE); g_get_from_expand = TRUE; diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 3f6b457..3b2f747 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3234,6 +3234,7 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, RECT scrollRect; LONG scrollDist = 0; TREEVIEW_ITEM *nextItem = NULL, *tmpItem; + BOOL wasExpanded; TRACE("TVE_COLLAPSE %p %s\n", item, TREEVIEW_ItemName(item)); @@ -3246,9 +3247,10 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, if (item->firstChild == NULL) return FALSE; + wasExpanded = (item->state & TVIS_EXPANDED) != 0; item->state &= ~TVIS_EXPANDED; - if (bUser) + if (wasExpanded && bUser) TREEVIEW_SendExpanded(infoPtr, item, action); bSetSelection = (infoPtr->selectedItem != NULL @@ -3329,7 +3331,7 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, bSetFirstVisible ? item : infoPtr->firstVisible, TRUE); - return TRUE; + return wasExpanded; } static BOOL
1
0
0
0
Daniel Jelinski : comctl32: Do not send TVN_ITEMEXPANDING when expanding item with no children.
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 9933f5e44639c5a3ca05c6ebe84032d5884573d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9933f5e44639c5a3ca05c6ebe…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Thu Sep 27 21:06:48 2012 +0200 comctl32: Do not send TVN_ITEMEXPANDING when expanding item with no children. --- dlls/comctl32/tests/treeview.c | 7 ++++++- dlls/comctl32/treeview.c | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index baf0e02..1021648 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -1393,6 +1393,11 @@ static void test_expandnotify(void) ret = SendMessageA(hTree, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hRoot); expect(TRUE, ret); + flush_sequences(sequences, NUM_MSG_SEQUENCES); + ret = SendMessageA(hTree, TVM_EXPAND, TVE_COLLAPSE, (LPARAM)hRoot); + todo_wine expect(FALSE, ret); + ok_sequence(sequences, PARENT_SEQ_INDEX, empty_seq, "no collapse notifications", FALSE); + g_get_from_expand = TRUE; /* expand */ flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -1481,7 +1486,7 @@ static void test_expandnotify(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); ret = SendMessageA(hTree, WM_KEYDOWN, VK_ADD, 0); expect(FALSE, ret); - ok_sequence(sequences, PARENT_SEQ_INDEX, parent_expand_empty_kb_seq, "expand node with no children", TRUE); + ok_sequence(sequences, PARENT_SEQ_INDEX, parent_expand_empty_kb_seq, "expand node with no children", FALSE); DestroyWindow(hTree); } diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 032f49e..3f6b457 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3237,10 +3237,10 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, TRACE("TVE_COLLAPSE %p %s\n", item, TREEVIEW_ItemName(item)); - if (!(item->state & TVIS_EXPANDED)) + if (!TREEVIEW_HasChildren(infoPtr, item)) return FALSE; - if (bUser || !(item->state & TVIS_EXPANDEDONCE)) + if (bUser) TREEVIEW_SendExpanding(infoPtr, item, action); if (item->firstChild == NULL) @@ -3248,7 +3248,7 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, item->state &= ~TVIS_EXPANDED; - if (bUser || !(item->state & TVIS_EXPANDEDONCE)) + if (bUser) TREEVIEW_SendExpanded(infoPtr, item, action); bSetSelection = (infoPtr->selectedItem != NULL @@ -3344,8 +3344,8 @@ TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item, TRACE("(%p, %p, partial=%d, %d\n", infoPtr, item, partial, user); - if (item->state & TVIS_EXPANDED) - return TRUE; + if (!TREEVIEW_HasChildren(infoPtr, item)) + return FALSE; tmpItem = item; nextItem = NULL; while (tmpItem)
1
0
0
0
Nikolay Sivov : dwrite: Implement GetMetrics() for IDWriteFont.
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 6067df72911b958772a31bfc367e3429d373f0a1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6067df72911b958772a31bfc3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Oct 16 12:56:23 2012 -0400 dwrite: Implement GetMetrics() for IDWriteFont. --- dlls/dwrite/font.c | 69 +++++++++++++++++++++++++++++++- dlls/dwrite/tests/font.c | 100 +++++++++++++++++++++++++++++++++++++++------ 2 files changed, 153 insertions(+), 16 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6067df72911b958772a31…
1
0
0
0
Nikolay Sivov : ole32: Cleanup IClientSecurity interface of a proxy manager .
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 90407224d0752354ff3ad4f0ed43dff256721d6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90407224d0752354ff3ad4f0e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Oct 15 23:30:40 2012 -0400 ole32: Cleanup IClientSecurity interface of a proxy manager. --- dlls/ole32/marshal.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index 9403789..a8df28c 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -57,7 +57,7 @@ struct proxy_manager { IMultiQI IMultiQI_iface; IMarshal IMarshal_iface; - const IClientSecurityVtbl *lpVtblCliSec; + IClientSecurity IClientSecurity_iface; struct apartment *parent; /* owning apartment (RO) */ struct list entry; /* entry in apartment (CS parent->cs) */ OXID oxid; /* object exported ID (RO) */ @@ -80,7 +80,7 @@ static inline struct proxy_manager *impl_from_IMarshal( IMarshal *iface ) static inline struct proxy_manager *impl_from_IClientSecurity( IClientSecurity *iface ) { - return (struct proxy_manager *)((char*)iface - FIELD_OFFSET(struct proxy_manager, lpVtblCliSec)); + return CONTAINING_RECORD(iface, struct proxy_manager, IClientSecurity_iface); } static HRESULT unmarshal_object(const STDOBJREF *stdobjref, APARTMENT *apt, @@ -756,7 +756,7 @@ static HRESULT proxy_manager_construct( This->IMultiQI_iface.lpVtbl = &ClientIdentity_Vtbl; This->IMarshal_iface.lpVtbl = &ProxyMarshal_Vtbl; - This->lpVtblCliSec = &ProxyCliSec_Vtbl; + This->IClientSecurity_iface.lpVtbl = &ProxyCliSec_Vtbl; list_init(&This->entry); list_init(&This->interfaces); @@ -881,8 +881,8 @@ static HRESULT proxy_manager_query_local_interface(struct proxy_manager * This, } if (IsEqualIID(riid, &IID_IClientSecurity)) { - *ppv = &This->lpVtblCliSec; - IUnknown_AddRef((IUnknown *)*ppv); + *ppv = &This->IClientSecurity_iface; + IClientSecurity_AddRef(&This->IClientSecurity_iface); return S_OK; }
1
0
0
0
Nikolay Sivov : ole32: Cleanup IMarshal interface of proxy manager.
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 21a04f56216eef04a156b361cdce8b9af5d22f34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21a04f56216eef04a156b361c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Oct 15 23:23:36 2012 -0400 ole32: Cleanup IMarshal interface of proxy manager. --- dlls/ole32/marshal.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index 8612b30..9403789 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -56,7 +56,7 @@ extern const CLSID CLSID_DfMarshal; struct proxy_manager { IMultiQI IMultiQI_iface; - const IMarshalVtbl *lpVtblMarshal; + IMarshal IMarshal_iface; const IClientSecurityVtbl *lpVtblCliSec; struct apartment *parent; /* owning apartment (RO) */ struct list entry; /* entry in apartment (CS parent->cs) */ @@ -75,7 +75,7 @@ struct proxy_manager static inline struct proxy_manager *impl_from_IMarshal( IMarshal *iface ) { - return (struct proxy_manager *)((char*)iface - FIELD_OFFSET(struct proxy_manager, lpVtblMarshal)); + return CONTAINING_RECORD(iface, struct proxy_manager, IMarshal_iface); } static inline struct proxy_manager *impl_from_IClientSecurity( IClientSecurity *iface ) @@ -755,7 +755,7 @@ static HRESULT proxy_manager_construct( } This->IMultiQI_iface.lpVtbl = &ClientIdentity_Vtbl; - This->lpVtblMarshal = &ProxyMarshal_Vtbl; + This->IMarshal_iface.lpVtbl = &ProxyMarshal_Vtbl; This->lpVtblCliSec = &ProxyCliSec_Vtbl; list_init(&This->entry); @@ -875,8 +875,8 @@ static HRESULT proxy_manager_query_local_interface(struct proxy_manager * This, } if (IsEqualIID(riid, &IID_IMarshal)) { - *ppv = &This->lpVtblMarshal; - IUnknown_AddRef((IUnknown *)*ppv); + *ppv = &This->IMarshal_iface; + IMarshal_AddRef(&This->IMarshal_iface); return S_OK; } if (IsEqualIID(riid, &IID_IClientSecurity))
1
0
0
0
Henri Verbeet : ddraw: Just implement ddraw7_RestoreDisplayMode() on top of wined3d_set_adapter_display_mode().
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 1fab14af9e2ecdc26c9cf7b72b28c74b1f98ad6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fab14af9e2ecdc26c9cf7b72…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Oct 15 22:26:21 2012 +0200 ddraw: Just implement ddraw7_RestoreDisplayMode() on top of wined3d_set_adapter_display_mode(). --- dlls/ddraw/ddraw.c | 155 +++++++++++++++++++------------------------- dlls/ddraw/ddraw_private.h | 4 +- 2 files changed, 68 insertions(+), 91 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 1ef06d0..9d2a78a 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1003,79 +1003,6 @@ static HRESULT WINAPI ddraw1_SetCooperativeLevel(IDirectDraw *iface, HWND window } /***************************************************************************** - * - * Helper function for SetDisplayMode and RestoreDisplayMode - * - * Implements DirectDraw's SetDisplayMode, but ignores the value of - * ForceRefreshRate, since it is already handled by - * ddraw7_SetDisplayMode. RestoreDisplayMode can use this function - * without worrying that ForceRefreshRate will override the refresh rate. For - * argument and return value documentation, see - * ddraw7_SetDisplayMode. - * - *****************************************************************************/ -static HRESULT ddraw_set_display_mode(struct ddraw *ddraw, DWORD Width, DWORD Height, - DWORD BPP, DWORD RefreshRate, DWORD Flags) -{ - struct wined3d_display_mode mode; - enum wined3d_format_id format; - HRESULT hr; - - TRACE("ddraw %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", ddraw, Width, - Height, BPP, RefreshRate, Flags); - - wined3d_mutex_lock(); - if( !Width || !Height ) - { - ERR("Width %u, Height %u, what to do?\n", Width, Height); - /* It looks like Need for Speed Porsche Unleashed expects DD_OK here */ - wined3d_mutex_unlock(); - return DD_OK; - } - - switch(BPP) - { - case 8: format = WINED3DFMT_P8_UINT; break; - case 15: format = WINED3DFMT_B5G5R5X1_UNORM; break; - case 16: format = WINED3DFMT_B5G6R5_UNORM; break; - case 24: format = WINED3DFMT_B8G8R8_UNORM; break; - case 32: format = WINED3DFMT_B8G8R8X8_UNORM; break; - default: format = WINED3DFMT_UNKNOWN; break; - } - - /* Check the exclusive mode - if(!(ddraw->cooperative_level & DDSCL_EXCLUSIVE)) - return DDERR_NOEXCLUSIVEMODE; - * This is WRONG. Don't know if the SDK is completely - * wrong and if there are any conditions when DDERR_NOEXCLUSIVE - * is returned, but Half-Life 1.1.1.1 (Steam version) - * depends on this - */ - - mode.width = Width; - mode.height = Height; - mode.refresh_rate = RefreshRate; - mode.format_id = format; - mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; - - /* TODO: The possible return values from msdn suggest that - * the screen mode can't be changed if a surface is locked - * or some drawing is in progress - */ - - /* TODO: Lose the primary surface */ - hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode); - - wined3d_mutex_unlock(); - - switch(hr) - { - case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED; - default: return hr; - } -} - -/***************************************************************************** * IDirectDraw7::SetDisplayMode * * Sets the display screen resolution, color depth and refresh frequency @@ -1097,22 +1024,67 @@ static HRESULT ddraw_set_display_mode(struct ddraw *ddraw, DWORD Width, DWORD He * DD_OK on success * *****************************************************************************/ -static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD Width, DWORD Height, - DWORD BPP, DWORD RefreshRate, DWORD Flags) +static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DWORD height, + DWORD bpp, DWORD refresh_rate, DWORD flags) { struct ddraw *ddraw = impl_from_IDirectDraw7(iface); + struct wined3d_display_mode mode; + enum wined3d_format_id format; + HRESULT hr; TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", - iface, Width, Height, BPP, RefreshRate, Flags); + iface, width, height, bpp, refresh_rate, flags); if (force_refresh_rate != 0) { TRACE("ForceRefreshRate overriding passed-in refresh rate (%u Hz) to %u Hz\n", - RefreshRate, force_refresh_rate); - RefreshRate = force_refresh_rate; + refresh_rate, force_refresh_rate); + refresh_rate = force_refresh_rate; } - return ddraw_set_display_mode(ddraw, Width, Height, BPP, RefreshRate, Flags); + wined3d_mutex_lock(); + + if (!width || !height) + { + /* It looks like Need for Speed Porsche Unleashed expects DD_OK here. */ + wined3d_mutex_unlock(); + return DD_OK; + } + + switch (bpp) + { + case 8: format = WINED3DFMT_P8_UINT; break; + case 15: format = WINED3DFMT_B5G5R5X1_UNORM; break; + case 16: format = WINED3DFMT_B5G6R5_UNORM; break; + case 24: format = WINED3DFMT_B8G8R8_UNORM; break; + case 32: format = WINED3DFMT_B8G8R8X8_UNORM; break; + default: format = WINED3DFMT_UNKNOWN; break; + } + + /* Check the exclusive mode. + * if(!(ddraw->cooperative_level & DDSCL_EXCLUSIVE)) + * return DDERR_NOEXCLUSIVEMODE; + * This is WRONG. Don't know if the SDK is completely wrong and if there + * are any conditions when DDERR_NOEXCLUSIVE is returned, but Half-Life + * 1.1.1.1 (Steam version) depends on this. */ + mode.width = width; + mode.height = height; + mode.refresh_rate = refresh_rate; + mode.format_id = format; + mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; + + /* TODO: The possible return values from msdn suggest that the screen mode + * can't be changed if a surface is locked or some drawing is in progress. */ + /* TODO: Lose the primary surface. */ + hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode); + + wined3d_mutex_unlock(); + + switch (hr) + { + case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED; + default: return hr; + } } static HRESULT WINAPI ddraw4_SetDisplayMode(IDirectDraw4 *iface, DWORD width, DWORD height, @@ -1170,10 +1142,17 @@ static HRESULT WINAPI ddraw1_SetDisplayMode(IDirectDraw *iface, DWORD width, DWO static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface) { struct ddraw *ddraw = impl_from_IDirectDraw7(iface); + HRESULT hr; TRACE("iface %p.\n", iface); - return ddraw_set_display_mode(ddraw, ddraw->orig_width, ddraw->orig_height, ddraw->orig_bpp, 0, 0); + wined3d_mutex_lock(); + + hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &ddraw->original_mode); + + wined3d_mutex_unlock(); + + return hr; } static HRESULT WINAPI ddraw4_RestoreDisplayMode(IDirectDraw4 *iface) @@ -5359,7 +5338,6 @@ static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops = HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type) { HRESULT hr; - HDC hDC; ddraw->IDirectDraw7_iface.lpVtbl = &ddraw7_vtbl; ddraw->IDirectDraw_iface.lpVtbl = &ddraw1_vtbl; @@ -5373,13 +5351,6 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type) ddraw->numIfaces = 1; ddraw->ref7 = 1; - /* Get the current screen settings. */ - hDC = GetDC(0); - ddraw->orig_bpp = GetDeviceCaps(hDC, BITSPIXEL) * GetDeviceCaps(hDC, PLANES); - ReleaseDC(0, hDC); - ddraw->orig_width = GetSystemMetrics(SM_CXSCREEN); - ddraw->orig_height = GetSystemMetrics(SM_CYSCREEN); - ddraw->wined3d = wined3d_create(7, WINED3D_LEGACY_DEPTH_BIAS); if (!ddraw->wined3d) { @@ -5387,6 +5358,14 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type) return E_OUTOFMEMORY; } + if (FAILED(hr = wined3d_get_adapter_display_mode(ddraw->wined3d, + WINED3DADAPTER_DEFAULT, &ddraw->original_mode, NULL))) + { + ERR("Failed to get display mode, hr %#x.\n", hr); + wined3d_decref(ddraw->wined3d); + return hr; + } + hr = wined3d_device_create(ddraw->wined3d, WINED3DADAPTER_DEFAULT, device_type, NULL, 0, 8, &ddraw->device_parent, &ddraw->wined3d_device); if (FAILED(hr)) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 563377f..0d15727 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -78,9 +78,7 @@ struct ddraw /* DirectDraw things, which are not handled by WineD3D */ DWORD cooperative_level; - - DWORD orig_width, orig_height; - DWORD orig_bpp; + struct wined3d_display_mode original_mode; /* D3D things */ HWND d3d_window;
1
0
0
0
Henri Verbeet : ddraw: Get rid of some fallback code in CreateSurface().
by Alexandre Julliard
16 Oct '12
16 Oct '12
Module: wine Branch: master Commit: 4a5ed44d7962b36401852e12dd2443f8b5b8dbc3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a5ed44d7962b36401852e12d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Oct 15 22:26:20 2012 +0200 ddraw: Get rid of some fallback code in CreateSurface(). --- dlls/ddraw/ddraw.c | 27 +-------------------------- 1 files changed, 1 insertions(+), 26 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index f34888d..1ef06d0 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -2772,35 +2772,10 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, copy_to_surfacedesc2(&desc2, DDSD); desc2.u4.ddpfPixelFormat.dwSize=sizeof(DDPIXELFORMAT); /* Just to be sure */ - /* Get the video mode from WineD3D - we will need it */ if (FAILED(hr = wined3d_get_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode, NULL))) { ERR("Failed to get display mode, hr %#x.\n", hr); - - switch (ddraw->orig_bpp) - { - case 8: - mode.format_id = WINED3DFMT_P8_UINT; - break; - - case 15: - mode.format_id = WINED3DFMT_B5G5R5X1_UNORM; - break; - - case 16: - mode.format_id = WINED3DFMT_B5G6R5_UNORM; - break; - - case 24: - mode.format_id = WINED3DFMT_B8G8R8_UNORM; - break; - - case 32: - mode.format_id = WINED3DFMT_B8G8R8X8_UNORM; - break; - } - mode.width = ddraw->orig_width; - mode.height = ddraw->orig_height; + return hr; } /* No pixelformat given? Use the current screen format */
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
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