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 2014
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
394 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Rename msvcrt_get_ioinfo function.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: 1d791f5db243362d9cad02b8cd279e98056bfb34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d791f5db243362d9cad02b8c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 11 15:58:08 2014 +0100 msvcrt: Rename msvcrt_get_ioinfo function. --- dlls/msvcrt/file.c | 98 +++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1d791f5db243362d9cad0…
1
0
0
0
Piotr Caban : msvcrt: Initialize file descriptor critical section.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: 0c4cb6ce5d411a60ec11e52d6481c4148344d067 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c4cb6ce5d411a60ec11e52d6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 11 15:58:03 2014 +0100 msvcrt: Initialize file descriptor critical section. --- dlls/msvcrt/file.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 5049605..0c83d15 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -380,7 +380,9 @@ static int msvcrt_set_fd(HANDLE hand, int flag, int fd) fdinfo->lookahead[0] = '\n'; fdinfo->lookahead[1] = '\n'; fdinfo->lookahead[2] = '\n'; - fdinfo->exflag = 0; + if(!(fdinfo->exflag & EF_CRIT_INIT)) + InitializeCriticalSection(&fdinfo->crit); + fdinfo->exflag = EF_CRIT_INIT; /* locate next free slot */ if (fd == MSVCRT_fdstart && fd == MSVCRT_fdend) @@ -1113,7 +1115,17 @@ void msvcrt_free_io(void) MSVCRT__fcloseall(); for(i=0; i<sizeof(MSVCRT___pioinfo)/sizeof(MSVCRT___pioinfo[0]); i++) + { + if(!MSVCRT___pioinfo[i]) + continue; + + for(j=0; j<MSVCRT_FD_BLOCK_SIZE; j++) + { + if(MSVCRT___pioinfo[i][j].exflag & EF_CRIT_INIT) + DeleteCriticalSection(&MSVCRT___pioinfo[i][j].crit); + } MSVCRT_free(MSVCRT___pioinfo[i]); + } for(j=0; j<MSVCRT_stream_idx; j++) {
1
0
0
0
Stefan Dösinger : d3d9/tests: Allow passing a resolution to reset_device.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: 6ad7d50958f6312d33c5e90195318ff96e42a42d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ad7d50958f6312d33c5e9019…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Nov 10 23:08:25 2014 +0100 d3d9/tests: Allow passing a resolution to reset_device. --- dlls/d3d9/tests/device.c | 83 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 27 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6ad7d50958f6312d33c5e…
1
0
0
0
Stefan Dösinger : d3d8/tests: Fix some wndproc comparison error messages.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: 7b7516189dc542cc754507ddc4cdec18b498ad56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b7516189dc542cc754507ddc…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Nov 10 23:08:24 2014 +0100 d3d8/tests: Fix some wndproc comparison error messages. --- dlls/d3d8/tests/device.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 9153139..7468d13 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -2311,8 +2311,7 @@ static void test_wndproc(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice8_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); @@ -2339,8 +2338,7 @@ static void test_wndproc(void) } proc = SetWindowLongPtrA(focus_window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice8_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); @@ -2459,8 +2457,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -2497,8 +2494,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, focus_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -2533,8 +2529,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -3208,8 +3203,7 @@ static void test_device_window_reset(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, FALSE); ok(SUCCEEDED(hr), "Failed to reset device.\n"); @@ -3227,8 +3221,7 @@ static void test_device_window_reset(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice8_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref);
1
0
0
0
Stefan Dösinger : d3d9/tests: Fix some wndproc comparison error messages.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: 5e369853f10f52d6f4d8c6ee16ae25020eea6b78 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e369853f10f52d6f4d8c6ee1…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Nov 10 23:08:23 2014 +0100 d3d9/tests: Fix some wndproc comparison error messages. --- dlls/d3d9/tests/d3d9ex.c | 15 +++++---------- dlls/d3d9/tests/device.c | 21 +++++++-------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index bc60fcc..d93e591 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -1869,8 +1869,7 @@ static void test_wndproc(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice9Ex_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); @@ -1897,8 +1896,7 @@ static void test_wndproc(void) } proc = SetWindowLongPtrA(focus_window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice9Ex_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); @@ -2012,8 +2010,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -2050,8 +2047,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, focus_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -2086,8 +2082,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index d3618e2..28dc52e 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -3260,8 +3260,7 @@ static void test_wndproc(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice9_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); @@ -3288,8 +3287,7 @@ static void test_wndproc(void) } proc = SetWindowLongPtrA(focus_window, GWLP_WNDPROC, (LONG_PTR)DefWindowProcA); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice9_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref); @@ -3408,8 +3406,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -3446,8 +3443,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, focus_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -3482,8 +3478,7 @@ static void test_wndproc_windowed(void) (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, TRUE); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); @@ -4122,8 +4117,7 @@ static void test_device_window_reset(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); hr = reset_device(device, device_window, FALSE); ok(SUCCEEDED(hr), "Failed to reset device.\n"); @@ -4141,8 +4135,7 @@ static void test_device_window_reset(void) ok(proc == (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", (LONG_PTR)test_proc, proc); proc = GetWindowLongPtrA(focus_window, GWLP_WNDPROC); - ok(proc != (LONG_PTR)test_proc, "Expected wndproc %#lx, got %#lx.\n", - (LONG_PTR)test_proc, proc); + ok(proc != (LONG_PTR)test_proc, "Expected wndproc != %#lx.\n", (LONG_PTR)test_proc); ref = IDirect3DDevice9_Release(device); ok(ref == 0, "The device was not properly freed: refcount %u.\n", ref);
1
0
0
0
Jacek Caban : mshtml: Ignore query and hash parts in res protocol handler.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: 83ceee7424064805b133dc4c2f65b3f791539c24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83ceee7424064805b133dc4c2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 11 11:37:22 2014 +0100 mshtml: Ignore query and hash parts in res protocol handler. --- dlls/mshtml/protocol.c | 8 +++++++- dlls/mshtml/tests/protocol.c | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/protocol.c b/dlls/mshtml/protocol.c index c8f8d08..2499db4 100644 --- a/dlls/mshtml/protocol.c +++ b/dlls/mshtml/protocol.c @@ -594,9 +594,9 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, DWORD grfPI, HANDLE_PTR dwReserved) { ResProtocol *This = ResProtocol_from_IInternetProtocol(iface); + WCHAR *url_dll, *url_file, *url, *mime, *res_type = (LPWSTR)RT_HTML, *ptr; DWORD grfBINDF = 0, len; BINDINFO bindinfo; - LPWSTR url_dll, url_file, url, mime, res_type = (LPWSTR)RT_HTML; HMODULE hdll; HRSRC src; HRESULT hres; @@ -646,6 +646,12 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, res_type = MAKEINTRESOURCEW(RT_HTML); } + /* Ignore query and hash parts. */ + if((ptr = strchrW(url_file, '?'))) + *ptr = 0; + if((ptr = strchrW(url_file, '#'))) + *ptr = 0; + hdll = LoadLibraryExW(url_dll, NULL, LOAD_LIBRARY_AS_DATAFILE); if(!hdll) { WARN("Could not open dll: %s\n", debugstr_w(url_dll)); diff --git a/dlls/mshtml/tests/protocol.c b/dlls/mshtml/tests/protocol.c index 3c3b58b..49743d5 100644 --- a/dlls/mshtml/tests/protocol.c +++ b/dlls/mshtml/tests/protocol.c @@ -601,6 +601,13 @@ static void test_res_protocol(void) test_res_url("/jstest.html"); test_res_url("/Test/res.html"); test_res_url("/test/dir/dir2/res.html"); + + if(GetProcAddress(LoadLibraryA("urlmon.dll"), "CreateUri")) { + test_res_url("/test/dir/dir2/res.html?query_part"); + test_res_url("/test/dir/dir2/res.html#hash_part"); + }else { + win_skip("IUri not supported\n"); + } } static void do_test_about_protocol(IClassFactory *factory, DWORD bf)
1
0
0
0
Jacek Caban : mshtml: Added support for IDispatchEx to HTMLSelectionObject object.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: b84bc52b71f82e1407a833ad06bba47a4d2a0bd2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b84bc52b71f82e1407a833ad0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 11 10:55:53 2014 +0100 mshtml: Added support for IDispatchEx to HTMLSelectionObject object. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/selection.c | 56 +++++++++++++++++++++++++++----------------- dlls/mshtml/tests/dom.c | 2 ++ 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6346dac..011fa9a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -174,6 +174,7 @@ typedef struct event_target_t event_target_t; XIID(IHTMLScreen) \ XIID(IHTMLScriptElement) \ XIID(IHTMLSelectElement) \ + XIID(IHTMLSelectionObject) \ XIID(IHTMLStorage) \ XIID(IHTMLStyle) \ XIID(IHTMLStyle2) \ diff --git a/dlls/mshtml/selection.c b/dlls/mshtml/selection.c index db3b7b3..f34154b 100644 --- a/dlls/mshtml/selection.c +++ b/dlls/mshtml/selection.c @@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); typedef struct { + DispatchEx dispex; IHTMLSelectionObject IHTMLSelectionObject_iface; LONG ref; @@ -52,26 +53,24 @@ static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *i { HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface); - *ppv = NULL; + TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); if(IsEqualGUID(&IID_IUnknown, riid)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); *ppv = &This->IHTMLSelectionObject_iface; }else if(IsEqualGUID(&IID_IDispatch, riid)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); *ppv = &This->IHTMLSelectionObject_iface; }else if(IsEqualGUID(&IID_IHTMLSelectionObject, riid)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); *ppv = &This->IHTMLSelectionObject_iface; + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { + return *ppv ? S_OK : E_NOINTERFACE; + }else { + *ppv = NULL; + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + return E_NOINTERFACE; } - if(*ppv) { - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - - WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); - return E_NOINTERFACE; + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; } static ULONG WINAPI HTMLSelectionObject_AddRef(IHTMLSelectionObject *iface) @@ -96,6 +95,7 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface) nsISelection_Release(This->nsselection); if(This->doc) list_remove(&This->entry); + release_dispex(&This->dispex); heap_free(This); } @@ -105,16 +105,16 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface) static HRESULT WINAPI HTMLSelectionObject_GetTypeInfoCount(IHTMLSelectionObject *iface, UINT *pctinfo) { HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface); - FIXME("(%p)->(%p)\n", This, pctinfo); - return E_NOTIMPL; + + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI HTMLSelectionObject_GetTypeInfo(IHTMLSelectionObject *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface); - FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); - return E_NOTIMPL; + + return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); } static HRESULT WINAPI HTMLSelectionObject_GetIDsOfNames(IHTMLSelectionObject *iface, REFIID riid, @@ -122,9 +122,9 @@ static HRESULT WINAPI HTMLSelectionObject_GetIDsOfNames(IHTMLSelectionObject *if LCID lcid, DISPID *rgDispId) { HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface); - FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, - lcid, rgDispId); - return E_NOTIMPL; + + return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, + cNames, lcid, rgDispId); } static HRESULT WINAPI HTMLSelectionObject_Invoke(IHTMLSelectionObject *iface, DISPID dispIdMember, @@ -132,9 +132,10 @@ static HRESULT WINAPI HTMLSelectionObject_Invoke(IHTMLSelectionObject *iface, DI VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface); - FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - return E_NOTIMPL; + + + return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } static HRESULT WINAPI HTMLSelectionObject_createRange(IHTMLSelectionObject *iface, IDispatch **range) @@ -233,6 +234,17 @@ static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl = { HTMLSelectionObject_get_type }; +static const tid_t HTMLSelectionObject_iface_tids[] = { + IHTMLSelectionObject_tid, + 0 +}; +static dispex_static_data_t HTMLSelectionObject_dispex = { + NULL, + IHTMLSelectionObject_tid, + NULL, + HTMLSelectionObject_iface_tids +}; + HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselection, IHTMLSelectionObject **ret) { HTMLSelectionObject *selection; @@ -241,6 +253,8 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect if(!selection) return E_OUTOFMEMORY; + init_dispex(&selection->dispex, (IUnknown*)&selection->IHTMLSelectionObject_iface, &HTMLSelectionObject_dispex); + selection->IHTMLSelectionObject_iface.lpVtbl = &HTMLSelectionObjectVtbl; selection->ref = 1; selection->nsselection = nsselection; /* We shouldn't call AddRef here */ diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index c4766dc..5dc0c4c 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -4975,6 +4975,8 @@ static void test_txtrange(IHTMLDocument2 *doc) hres = IHTMLDocument2_get_selection(doc, &selection); ok(hres == S_OK, "IHTMLDocument2_get_selection failed: %08x\n", hres); + test_disp((IUnknown*)selection, &IID_IHTMLSelectionObject, "[object]"); + hres = IHTMLSelectionObject_createRange(selection, &disp_range); ok(hres == S_OK, "IHTMLSelectionObject_createRange failed: %08x\n", hres); IHTMLSelectionObject_Release(selection);
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to HTMLTxtRange object.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: dcfa250cd2486cb3eddc6010f0ce681563a036e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dcfa250cd2486cb3eddc6010f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 11 10:55:34 2014 +0100 mshtml: Added IDispatchEx support to HTMLTxtRange object. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/dom.c | 2 ++ dlls/mshtml/txtrange.c | 58 ++++++++++++++++++++++++++------------------ 3 files changed, 37 insertions(+), 24 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index abe7995..6346dac 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -193,6 +193,7 @@ typedef struct event_target_t event_target_t; XIID(IHTMLTextAreaElement) \ XIID(IHTMLTextContainer) \ XIID(IHTMLTitleElement) \ + XIID(IHTMLTxtRange) \ XIID(IHTMLUniqueName) \ XIID(IHTMLWindow2) \ XIID(IHTMLWindow3) \ diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index f0f03b8..c4766dc 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -4827,6 +4827,8 @@ static void test_txtrange(IHTMLDocument2 *doc) body_range = test_create_body_range(doc); + test_disp((IUnknown*)body_range, &IID_IHTMLTxtRange, "[object]"); + test_range_text(body_range, "test abc 123\r\nit's text"); hres = IHTMLTxtRange_duplicate(body_range, &range); diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index e88d960..6b57eb2 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -36,6 +36,7 @@ static const WCHAR brW[] = {'b','r',0}; static const WCHAR hrW[] = {'h','r',0}; typedef struct { + DispatchEx dispex; IHTMLTxtRange IHTMLTxtRange_iface; IOleCommandTarget IOleCommandTarget_iface; @@ -1004,29 +1005,24 @@ static HRESULT WINAPI HTMLTxtRange_QueryInterface(IHTMLTxtRange *iface, REFIID r { HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface); - *ppv = NULL; + TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); if(IsEqualGUID(&IID_IUnknown, riid)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = &This->IHTMLTxtRange_iface; - }else if(IsEqualGUID(&IID_IDispatch, riid)) { - TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); *ppv = &This->IHTMLTxtRange_iface; }else if(IsEqualGUID(&IID_IHTMLTxtRange, riid)) { - TRACE("(%p)->(IID_IHTMLTxtRange %p)\n", This, ppv); *ppv = &This->IHTMLTxtRange_iface; }else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) { - TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv); *ppv = &This->IOleCommandTarget_iface; + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { + return *ppv ? S_OK : E_NOINTERFACE; + }else { + *ppv = NULL; + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + return E_NOINTERFACE; } - if(*ppv) { - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - - WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); - return E_NOINTERFACE; + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; } static ULONG WINAPI HTMLTxtRange_AddRef(IHTMLTxtRange *iface) @@ -1051,6 +1047,7 @@ static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface) nsIDOMRange_Release(This->nsrange); if(This->doc) list_remove(&This->entry); + release_dispex(&This->dispex); heap_free(This); } @@ -1060,16 +1057,16 @@ static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface) static HRESULT WINAPI HTMLTxtRange_GetTypeInfoCount(IHTMLTxtRange *iface, UINT *pctinfo) { HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface); - FIXME("(%p)->(%p)\n", This, pctinfo); - return E_NOTIMPL; + + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI HTMLTxtRange_GetTypeInfo(IHTMLTxtRange *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface); - FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); - return E_NOTIMPL; + + return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); } static HRESULT WINAPI HTMLTxtRange_GetIDsOfNames(IHTMLTxtRange *iface, REFIID riid, @@ -1077,9 +1074,9 @@ static HRESULT WINAPI HTMLTxtRange_GetIDsOfNames(IHTMLTxtRange *iface, REFIID ri LCID lcid, DISPID *rgDispId) { HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface); - FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, - lcid, rgDispId); - return E_NOTIMPL; + + return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, + cNames, lcid, rgDispId); } static HRESULT WINAPI HTMLTxtRange_Invoke(IHTMLTxtRange *iface, DISPID dispIdMember, @@ -1087,9 +1084,9 @@ static HRESULT WINAPI HTMLTxtRange_Invoke(IHTMLTxtRange *iface, DISPID dispIdMem VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface); - FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), - lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); - return E_NOTIMPL; + + return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } static HRESULT WINAPI HTMLTxtRange_get_htmlText(IHTMLTxtRange *iface, BSTR *p) @@ -1850,6 +1847,17 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = { RangeCommandTarget_Exec }; +static const tid_t HTMLTxtRange_iface_tids[] = { + IHTMLTxtRange_tid, + 0 +}; +static dispex_static_data_t HTMLTxtRange_dispex = { + NULL, + IHTMLTxtRange_tid, + NULL, + HTMLTxtRange_iface_tids +}; + HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTxtRange **p) { HTMLTxtRange *ret; @@ -1858,6 +1866,8 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTx if(!ret) return E_OUTOFMEMORY; + init_dispex(&ret->dispex, (IUnknown*)&ret->IHTMLTxtRange_iface, &HTMLTxtRange_dispex); + ret->IHTMLTxtRange_iface.lpVtbl = &HTMLTxtRangeVtbl; ret->IOleCommandTarget_iface.lpVtbl = &OleCommandTargetVtbl; ret->ref = 1;
1
0
0
0
Sebastian Lackner : d3dx9_36/tests: Remove code to skip test which should never fail.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: fc0392a24e219161d2c9ec2d43304819853cc817 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc0392a24e219161d2c9ec2d4…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Nov 5 18:50:45 2014 +0100 d3dx9_36/tests: Remove code to skip test which should never fail. --- dlls/d3dx9_36/tests/mesh.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 2a617f5..870f62a 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -2579,24 +2579,17 @@ static void D3DXCreateBoxTest(void) hr = D3DXCreateBox(device,10.9f,20.0f,4.9f,&box, &ppBuffer); ok(hr==D3D_OK, "Expected D3D_OK, received %#x\n", hr); - if (FAILED(hr)) - { - skip("D3DXCreateBox failed\n"); - goto end; - } - buffer = ID3DXBuffer_GetBufferPointer(ppBuffer); for(i=0; i<36; i++) ok(adjacency[i]==buffer[i], "expected adjacency %d: %#x, received %#x\n",i,adjacency[i], buffer[i]); box->lpVtbl->Release(box); + ID3DXBuffer_Release(ppBuffer); test_box(device, 10.9f, 20.0f, 4.9f); -end: IDirect3DDevice9_Release(device); IDirect3D9_Release(d3d); - if (ppBuffer) ID3DXBuffer_Release(ppBuffer); DestroyWindow(wnd); }
1
0
0
0
Sebastian Lackner : d3dx9_36/tests: Add tests for D3DXCreatePolygon.
by Alexandre Julliard
11 Nov '14
11 Nov '14
Module: wine Branch: master Commit: b8814764aa7c4fe803a25b55dfe51d256e139c03 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b8814764aa7c4fe803a25b55d…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Oct 31 10:56:42 2014 +0100 d3dx9_36/tests: Add tests for D3DXCreatePolygon. Based on a patch by David Adam. --- dlls/d3dx9_36/tests/mesh.c | 155 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 17c5d9c..2a617f5 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -2600,6 +2600,160 @@ end: DestroyWindow(wnd); } +static BOOL compute_polygon(struct mesh *mesh, float length, unsigned int sides) +{ + unsigned int i; + float scale; + + if (!new_mesh(mesh, sides + 1, sides)) + return FALSE; + + scale = 0.5f * length / sinf(D3DX_PI / sides); + + mesh->vertices[0].position.x = 0.0f; + mesh->vertices[0].position.y = 0.0f; + mesh->vertices[0].position.z = 0.0f; + mesh->vertices[0].normal.x = 0.0f; + mesh->vertices[0].normal.y = 0.0f; + mesh->vertices[0].normal.z = 1.0f; + + for (i = 0; i < sides; ++i) + { + mesh->vertices[i + 1].position.x = cosf(2.0f * D3DX_PI * i / sides) * scale; + mesh->vertices[i + 1].position.y = sinf(2.0f * D3DX_PI * i / sides) * scale; + mesh->vertices[i + 1].position.z = 0.0f; + mesh->vertices[i + 1].normal.x = 0.0f; + mesh->vertices[i + 1].normal.y = 0.0f; + mesh->vertices[i + 1].normal.z = 1.0f; + + mesh->faces[i][0] = 0; + mesh->faces[i][1] = i + 1; + mesh->faces[i][2] = i + 2; + } + + mesh->faces[sides - 1][2] = 1; + + return TRUE; +} + +static void test_polygon(IDirect3DDevice9 *device, float length, unsigned int sides) +{ + HRESULT hr; + ID3DXMesh *polygon; + struct mesh mesh; + char name[64]; + + hr = D3DXCreatePolygon(device, length, sides, &polygon, NULL); + ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); + if (hr != D3D_OK) + { + skip("Couldn't create polygon\n"); + return; + } + + if (!compute_polygon(&mesh, length, sides)) + { + skip("Couldn't create mesh\n"); + polygon->lpVtbl->Release(polygon); + return; + } + + mesh.fvf = D3DFVF_XYZ | D3DFVF_NORMAL; + + sprintf(name, "polygon (%g, %d)", length, sides); + compare_mesh(name, polygon, &mesh); + + free_mesh(&mesh); + + polygon->lpVtbl->Release(polygon); +} + +static void D3DXCreatePolygonTest(void) +{ + HRESULT hr; + HWND wnd; + IDirect3D9 *d3d; + IDirect3DDevice9 *device; + D3DPRESENT_PARAMETERS d3dpp; + ID3DXMesh *polygon; + ID3DXBuffer *adjacency; + DWORD (*buffer)[3], buffer_size; + unsigned int i; + + if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0, + 640, 480, NULL, NULL, NULL, NULL))) + { + skip("Couldn't create application window\n"); + return; + } + if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION))) + { + skip("Couldn't create IDirect3D9 object\n"); + DestroyWindow(wnd); + return; + } + + memset(&d3dpp, 0, sizeof(d3dpp)); + d3dpp.Windowed = TRUE; + d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; + hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd, + D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device); + if (FAILED(hr)) + { + skip("Failed to create IDirect3DDevice9 object %#x\n", hr); + IDirect3D9_Release(d3d); + DestroyWindow(wnd); + return; + } + + hr = D3DXCreatePolygon(device, 2.0f, 11, NULL, &adjacency); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + + hr = D3DXCreatePolygon(NULL, 2.0f, 11, &polygon, &adjacency); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + + hr = D3DXCreatePolygon(device, -2.0f, 11, &polygon, &adjacency); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + + polygon = (void *)0xdeadbeef; + adjacency = (void *)0xdeadbeef; + hr = D3DXCreatePolygon(device, 2.0f, 0, &polygon, &adjacency); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + ok(polygon == (void *)0xdeadbeef, "Polygon was changed to %p\n", polygon); + ok(adjacency == (void *)0xdeadbeef, "Adjacency was changed to %p\n", adjacency); + + hr = D3DXCreatePolygon(device, 2.0f, 2, &polygon, &adjacency); + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr); + + adjacency = NULL; + hr = D3DXCreatePolygon(device, 3.0f, 11, &polygon, &adjacency); + ok(hr == D3D_OK, "Expected D3D_OK, received %#x\n", hr); + + buffer_size = ID3DXBuffer_GetBufferSize(adjacency); + ok(buffer_size == 33 * sizeof(DWORD), "Wrong adjacency buffer size %u\n", buffer_size); + + buffer = ID3DXBuffer_GetBufferPointer(adjacency); + for (i = 0; i < 11; ++i) + { + ok(buffer[i][0] == (i + 10) % 11, "Wrong adjacency[%d][0] = %u\n", i, buffer[i][0]); + ok(buffer[i][1] == ~0U, "Wrong adjacency[%d][1] = %u\n", i, buffer[i][1]); + ok(buffer[i][2] == (i + 1) % 11, "Wrong adjacency[%d][2] = %u\n", i, buffer[i][2]); + } + + polygon->lpVtbl->Release(polygon); + ID3DXBuffer_Release(adjacency); + + test_polygon(device, 2.0f, 3); + test_polygon(device, 10.0f, 3); + test_polygon(device, 10.0f, 5); + test_polygon(device, 10.0f, 10); + test_polygon(device, 20.0f, 10); + + IDirect3DDevice9_Release(device); + IDirect3D9_Release(d3d); + DestroyWindow(wnd); +} + struct sincos_table { float *sin; @@ -10458,6 +10612,7 @@ START_TEST(mesh) D3DXCreateMeshFVFTest(); D3DXLoadMeshTest(); D3DXCreateBoxTest(); + D3DXCreatePolygonTest(); D3DXCreateSphereTest(); D3DXCreateCylinderTest(); D3DXCreateTextTest();
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
40
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
Results per page:
10
25
50
100
200