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
February 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
503 discussions
Start a n
N
ew thread
Jacek Caban : wmp: Added DoVerb(OLEIVERB_INPLACEACTIVATE) implementation.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: 79fc46ddbb7c89c7c25a4c5a893f4f92cccdb1ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79fc46ddbb7c89c7c25a4c5a8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 20 16:01:45 2014 +0100 wmp: Added DoVerb(OLEIVERB_INPLACEACTIVATE) implementation. --- dlls/wmp/Makefile.in | 1 + dlls/wmp/oleobj.c | 188 +++++++++++++++++++++++++++++++++++++++++++++++- dlls/wmp/wmp_main.c | 5 +- dlls/wmp/wmp_private.h | 5 ++ 4 files changed, 197 insertions(+), 2 deletions(-) diff --git a/dlls/wmp/Makefile.in b/dlls/wmp/Makefile.in index a4d07c1..a82cc36 100644 --- a/dlls/wmp/Makefile.in +++ b/dlls/wmp/Makefile.in @@ -1,4 +1,5 @@ MODULE = wmp.dll +IMPORTS = user32 gdi32 C_SRCS = \ oleobj.c \ diff --git a/dlls/wmp/oleobj.c b/dlls/wmp/oleobj.c index a6daabb..7074bd6 100644 --- a/dlls/wmp/oleobj.c +++ b/dlls/wmp/oleobj.c @@ -23,11 +23,189 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmp); +static HWND get_container_hwnd(WindowsMediaPlayer *This) +{ + IOleWindow *ole_window; + HWND hwnd = NULL; + HRESULT hres; + + /* IOleInPlaceSite (which inherits from IOleWindow) is prefered. */ + hres = IOleClientSite_QueryInterface(This->client_site, &IID_IOleInPlaceSite, (void**)&ole_window); + if(FAILED(hres)) { + hres = IOleClientSite_QueryInterface(This->client_site, &IID_IOleWindow, (void**)&ole_window); + if(FAILED(hres)) { + IOleContainer *container = NULL; + + hres = IOleClientSite_GetContainer(This->client_site, &container); + if(SUCCEEDED(hres)) { + hres = IOleContainer_QueryInterface(container, &IID_IOleWindow, (void**)&ole_window); + IOleContainer_Release(container); + } + } + } + + if(FAILED(hres)) + return NULL; + + hres = IOleWindow_GetWindow(ole_window, &hwnd); + IOleWindow_Release(ole_window); + if(FAILED(hres)) + return NULL; + + TRACE("Got window %p\n", hwnd); + return hwnd; +} + +static LRESULT WINAPI wmp_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) { + case WM_PAINT: { + PAINTSTRUCT ps; + HFONT font; + RECT rect; + HDC hdc; + + TRACE("WM_PAINT\n"); + + GetClientRect(hwnd, &rect); + hdc = BeginPaint(hwnd, &ps); + + SelectObject(hdc, GetStockObject(DC_BRUSH)); + SetDCBrushColor(hdc, RGB(255,0,0)); + SetBkColor(hdc, RGB(255,0,0)); + + font = CreateFontA(25,0,0,0,400,0,0,0,ANSI_CHARSET,0,0,DEFAULT_QUALITY,DEFAULT_PITCH,NULL); + SelectObject(hdc, font); + + Rectangle(hdc, rect.left, rect.top, rect.right, rect.bottom); + DrawTextA(hdc, "FIXME: WMP", -1, &rect, DT_CENTER | DT_SINGLELINE | DT_VCENTER); + + DeleteObject(font); + EndPaint(hwnd, &ps); + break; + } + } + + return DefWindowProcW(hwnd, msg, wParam, lParam); + +} + +static ATOM wmp_class; + +static BOOL WINAPI register_wmp_class(INIT_ONCE *once, void *param, void **context) +{ + /* It seems that native uses ATL for this. We use a fake name to make tests happy. */ + static const WCHAR atl_wmpW[] = {'A','T','L',':','W','M','P',0}; + + static WNDCLASSEXW wndclass = { + sizeof(wndclass), CS_DBLCLKS, wmp_wnd_proc, 0, 0, + NULL, NULL, NULL, NULL, NULL, + atl_wmpW, NULL + }; + + wndclass.hInstance = wmp_instance; + wmp_class = RegisterClassExW(&wndclass); + return TRUE; +} + +void unregister_wmp_class(void) +{ + if(wmp_class) + UnregisterClassW(MAKEINTRESOURCEW(wmp_class), wmp_instance); +} + +static HWND create_wmp_window(WindowsMediaPlayer *wmp, const RECT *posrect) +{ + static INIT_ONCE class_init_once = INIT_ONCE_STATIC_INIT; + + InitOnceExecuteOnce(&class_init_once, register_wmp_class, NULL, NULL); + if(!wmp_class) + return NULL; + + return CreateWindowExW(0, MAKEINTRESOURCEW(wmp_class), NULL, WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_VISIBLE|WS_CHILD, + posrect->left, posrect->top, posrect->right-posrect->left, posrect->bottom-posrect->top, + get_container_hwnd(wmp), NULL, wmp_instance, NULL); +} + +static HRESULT activate_inplace(WindowsMediaPlayer *This) +{ + IOleInPlaceSiteWindowless *ipsite_windowless; + IOleInPlaceSiteEx *ipsiteex = NULL; + IOleInPlaceSite *ipsite; + IOleInPlaceUIWindow *ip_window = NULL; + IOleInPlaceFrame *ip_frame = NULL; + RECT posrect = {0}, cliprect = {0}; + OLEINPLACEFRAMEINFO frameinfo = { sizeof(frameinfo) }; + HRESULT hres; + + if(This->hwnd) { + FIXME("Already activated\n"); + return E_UNEXPECTED; + } + + hres = IOleClientSite_QueryInterface(This->client_site, &IID_IOleInPlaceSiteWindowless, (void**)&ipsite_windowless); + if(SUCCEEDED(hres)) { + hres = IOleInPlaceSiteWindowless_CanWindowlessActivate(ipsite_windowless); + IOleInPlaceSiteWindowless_Release(ipsite_windowless); + if(hres == S_OK) + FIXME("Windowless activation not supported\n"); + ipsiteex = (IOleInPlaceSiteEx*)ipsite_windowless; + }else { + IOleClientSite_QueryInterface(This->client_site, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex); + } + + if(ipsiteex) { + BOOL redraw = FALSE; /* Not really used. */ + IOleInPlaceSiteEx_OnInPlaceActivateEx(ipsiteex, &redraw, 0); + ipsite = (IOleInPlaceSite*)ipsiteex; + }else { + IOleClientSite_QueryInterface(This->client_site, &IID_IOleInPlaceSite, (void**)&ipsite); + if(FAILED(hres)) { + FIXME("No IOleInPlaceSite instance\n"); + return hres; + } + + IOleInPlaceSite_OnInPlaceActivate(ipsite); + } + + hres = IOleInPlaceSite_GetWindowContext(ipsite, &ip_frame, &ip_window, &posrect, &cliprect, &frameinfo); + IOleInPlaceSite_Release(ipsite); + if(FAILED(hres)) { + FIXME("GetWindowContext failed: %08x\n", hres); + return hres; + } + + This->hwnd = create_wmp_window(This, &posrect); + if(!This->hwnd) + return E_FAIL; + + IOleClientSite_ShowObject(This->client_site); + return S_OK; +} + +static void deactivate_window(WindowsMediaPlayer *This) +{ + IOleInPlaceSite *ip_site; + HRESULT hres; + + hres = IOleClientSite_QueryInterface(This->client_site, &IID_IOleInPlaceSite, (void**)&ip_site); + if(SUCCEEDED(hres)) { + IOleInPlaceSite_OnInPlaceDeactivate(ip_site); + IOleInPlaceSite_Release(ip_site); + } + + DestroyWindow(This->hwnd); + This->hwnd = NULL; +} + static void release_client_site(WindowsMediaPlayer *This) { if(!This->client_site) return; + if(This->hwnd) + deactivate_window(This); + IOleClientSite_Release(This->client_site); This->client_site = NULL; } @@ -206,7 +384,15 @@ static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpms LONG lindex, HWND hwndParent, LPCRECT lprcPosRect) { WindowsMediaPlayer *This = impl_from_IOleObject(iface); - FIXME("(%p)->(%d %p %p %d %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect); + + switch(iVerb) { + case OLEIVERB_INPLACEACTIVATE: + TRACE("(%p)->(OLEIVERB_INPLACEACTIVATE)\n", This); + return activate_inplace(This); + default: + FIXME("Unsupported iVerb %d\n", iVerb); + } + return E_NOTIMPL; } diff --git a/dlls/wmp/wmp_main.c b/dlls/wmp/wmp_main.c index 995c08e..29b096f 100644 --- a/dlls/wmp/wmp_main.c +++ b/dlls/wmp/wmp_main.c @@ -24,7 +24,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmp); -static HINSTANCE wmp_instance; +HINSTANCE wmp_instance; static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) { @@ -89,6 +89,9 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) DisableThreadLibraryCalls(hInstDLL); wmp_instance = hInstDLL; break; + case DLL_PROCESS_DETACH: + unregister_wmp_class(); + break; } return TRUE; diff --git a/dlls/wmp/wmp_private.h b/dlls/wmp/wmp_private.h index 8f1a85a..11d4c22 100644 --- a/dlls/wmp/wmp_private.h +++ b/dlls/wmp/wmp_private.h @@ -33,12 +33,17 @@ struct WindowsMediaPlayer { LONG ref; IOleClientSite *client_site; + HWND hwnd; }; void init_player_ifaces(WindowsMediaPlayer*) DECLSPEC_HIDDEN; HRESULT WINAPI WMPFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; +void unregister_wmp_class(void) DECLSPEC_HIDDEN; + +extern HINSTANCE wmp_instance; + static inline void *heap_alloc(size_t len) { return HeapAlloc(GetProcessHeap(), 0, len);
1
0
0
0
Jacek Caban : wmp/tests: Fixed tests on old WMP versions.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: 89c5cefb2539bd27ca77d6ab447dd848579c8b2b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89c5cefb2539bd27ca77d6ab4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 20 16:01:33 2014 +0100 wmp/tests: Fixed tests on old WMP versions. --- dlls/wmp/tests/oleobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c index fba35e5..61cfcb9 100644 --- a/dlls/wmp/tests/oleobj.c +++ b/dlls/wmp/tests/oleobj.c @@ -692,7 +692,7 @@ static void test_wmp(void) client_site = (void*)0xdeadbeef; hres = IOleObject_GetClientSite(oleobj, &client_site); - ok(hres == E_FAIL, "GetClientSite failed: %08x\n", hres); + ok(hres == E_FAIL || broken(hres == S_OK), "GetClientSite failed: %08x\n", hres); ok(!client_site, "client_site = %p\n", client_site); ref = IOleObject_Release(oleobj);
1
0
0
0
Dmitry Timoshkov : xmllite/tests: Add a test for parsing an empty element after XML declaration.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: f41f8af0212161a7b377b024fc822a197cd5764d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f41f8af0212161a7b377b024f…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Feb 20 19:28:09 2014 +0900 xmllite/tests: Add a test for parsing an empty element after XML declaration. --- dlls/xmllite/tests/reader.c | 50 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c index 312516b..992d15c 100644 --- a/dlls/xmllite/tests/reader.c +++ b/dlls/xmllite/tests/reader.c @@ -55,7 +55,7 @@ static void free_str(WCHAR *str) } static const char xmldecl_full[] = "\xef\xbb\xbf<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"; -static const char xmldecl_short[] = "<?xml version=\"1.0\"?>\n"; +static const char xmldecl_short[] = "<?xml version=\"1.0\"?><RegistrationInfo/>"; static IStream *create_stream_on_data(const char *data, int size) { @@ -644,6 +644,8 @@ if (0) static void test_read_xmldeclaration(void) { + static const WCHAR xmlW[] = {'x','m','l',0}; + static const WCHAR RegistrationInfoW[] = {'R','e','g','i','s','t','r','a','t','i','o','n','I','n','f','o',0}; static const struct { WCHAR name[12]; @@ -659,6 +661,7 @@ static void test_read_xmldeclaration(void) HRESULT hr; XmlNodeType type; UINT count = 0, len, i; + BOOL ret; const WCHAR *val; hr = pCreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader, NULL); @@ -793,10 +796,22 @@ todo_wine { ok_pos(reader, 1, 3, 1, 21, TRUE); test_read_state(reader, XmlReadState_Interactive, -1, TRUE); + hr = IXmlReader_GetAttributeCount(reader, &count); + ok(hr == S_OK, "expected S_OK, got %08x\n", hr); + ok(count == 1, "expected 1, got %d\n", count); + + ret = IXmlReader_IsEmptyElement(reader); + ok(!ret, "element should not be empty\n"); + hr = IXmlReader_GetValue(reader, &val, NULL); ok(hr == S_OK, "expected S_OK, got %08x\n", hr); ok(*val == 0, "got %s\n", wine_dbgstr_w(val)); + hr = IXmlReader_GetLocalName(reader, &val, NULL); + ok(hr == S_OK, "expected S_OK, got %08x\n", hr); +todo_wine + ok(!lstrcmpW(val, xmlW), "got %s\n", wine_dbgstr_w(val)); + /* check attributes */ hr = IXmlReader_MoveToNextAttribute(reader); ok(hr == S_OK, "expected S_OK, got %08x\n", hr); @@ -811,6 +826,39 @@ todo_wine { hr = IXmlReader_MoveToNextAttribute(reader); ok(hr == S_FALSE, "expected S_FALSE, got %08x\n", hr); + type = -1; + hr = IXmlReader_Read(reader, &type); + ok(hr == S_OK, "expected S_OK, got %08x\n", hr); + ok(type == XmlNodeType_Element, "expected Element, got %s\n", type_to_str(type)); + ok_pos(reader, 1, 23, 1, 40, TRUE); + test_read_state(reader, XmlReadState_Interactive, -1, TRUE); + + hr = IXmlReader_GetAttributeCount(reader, &count); + ok(hr == S_OK, "expected S_OK, got %08x\n", hr); + ok(count == 0, "expected 0, got %d\n", count); + + ret = IXmlReader_IsEmptyElement(reader); +todo_wine + ok(ret, "element should be empty\n"); + + hr = IXmlReader_GetValue(reader, &val, NULL); + ok(hr == S_OK, "expected S_OK, got %08x\n", hr); +todo_wine + ok(*val == 0, "got %s\n", wine_dbgstr_w(val)); + + hr = IXmlReader_GetLocalName(reader, &val, NULL); + ok(hr == S_OK, "expected S_OK, got %08x\n", hr); + ok(!lstrcmpW(val, RegistrationInfoW), "got %s\n", wine_dbgstr_w(val)); + + type = -1; + hr = IXmlReader_Read(reader, &type); +todo_wine + ok(hr == WC_E_SYNTAX || hr == WC_E_XMLCHARACTER /* XP */, "expected WC_E_SYNTAX, got %08x\n", hr); +todo_wine + ok(type == XmlNodeType_None, "expected None, got %s\n", type_to_str(type)); + ok_pos(reader, 1, 41, -1, -1, TRUE); + test_read_state(reader, XmlReadState_Error, -1, TRUE); + IStream_Release(stream); IXmlReader_Release(reader); }
1
0
0
0
Huw Davies : user32: If the listbox loses focus while holding capture, release it by essentially simulating a button up event.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: fb298aed049ed9a002a7a2451ae964f77eaacd59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb298aed049ed9a002a7a2451…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Feb 20 11:35:18 2014 +0000 user32: If the listbox loses focus while holding capture, release it by essentially simulating a button up event. --- dlls/user32/listbox.c | 1 + dlls/user32/tests/listbox.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 5a78dda..c282d5d 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -2995,6 +2995,7 @@ LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam SEND_NOTIFICATION( descr, LBN_SETFOCUS ); return 0; case WM_KILLFOCUS: + LISTBOX_HandleLButtonUp( descr ); /* Release capture if we have it */ descr->in_focus = FALSE; descr->wheel_remain = 0; if ((descr->focus_item != -1) && descr->caret_on) diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index fdc190d..8e3fbcd 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -234,6 +234,8 @@ static void check_item_height(void) DestroyWindow (hLB); } +static int got_selchange; + static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { switch (msg) @@ -267,6 +269,10 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA break; } + case WM_COMMAND: + if (HIWORD( wparam ) == LBN_SELCHANGE) got_selchange++; + break; + default: break; } @@ -1588,6 +1594,29 @@ todo_wine DestroyWindow(parent); } +static void test_missing_lbuttonup( void ) +{ + HWND listbox, parent, capture; + + parent = create_parent(); + listbox = create_listbox(WS_CHILD | WS_VISIBLE, parent); + + /* Send button down without a corresponding button up */ + SendMessageA(listbox, WM_LBUTTONDOWN, 0, MAKELPARAM(10,10)); + capture = GetCapture(); + ok(capture == listbox, "got %p expected %p\n", capture, listbox); + + /* Capture is released and LBN_SELCHANGE sent during WM_KILLFOCUS */ + got_selchange = 0; + SetFocus(NULL); + capture = GetCapture(); + ok(capture == NULL, "got %p\n", capture); + ok(got_selchange, "got %d\n", got_selchange); + + DestroyWindow(listbox); + DestroyWindow(parent); +} + START_TEST(listbox) { const struct listbox_test SS = @@ -1668,4 +1697,5 @@ START_TEST(listbox) test_listbox_dlgdir(); test_set_count(); test_GetListBoxInfo(); + test_missing_lbuttonup(); }
1
0
0
0
Bruno Jesus : ws2_32: Fix conversion of address in GetAddrInfoW.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: 5782bac2a049b93e2446a8466635489327100b35 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5782bac2a049b93e2446a8466…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Tue Feb 18 01:24:09 2014 -0300 ws2_32: Fix conversion of address in GetAddrInfoW. --- dlls/ws2_32/socket.c | 4 +- dlls/ws2_32/tests/sock.c | 96 +++++++++++++++++++++++++++++++++++++--------- 2 files changed, 80 insertions(+), 20 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index a9ac79d..2a2c809 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -5612,13 +5612,13 @@ static struct WS_addrinfoW *addrinfo_AtoW(const struct WS_addrinfo *ai) } if (ai->ai_addr) { - if (!(ret->ai_addr = HeapAlloc(GetProcessHeap(), 0, sizeof(struct WS_sockaddr)))) + if (!(ret->ai_addr = HeapAlloc(GetProcessHeap(), 0, ai->ai_addrlen))) { HeapFree(GetProcessHeap(), 0, ret->ai_canonname); HeapFree(GetProcessHeap(), 0, ret); return NULL; } - memcpy(ret->ai_addr, ai->ai_addr, sizeof(struct WS_sockaddr)); + memcpy(ret->ai_addr, ai->ai_addr, ai->ai_addrlen); } return ret; } diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index e146548..31db63a 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -349,6 +349,62 @@ static void check_so_opentype (void) ok ( tmp == 0, "check_so_opentype: wrong startup value of SO_OPENTYPE: %d\n", tmp ); } +static void compare_addrinfo (ADDRINFO *a, ADDRINFO *b) +{ + for (; a && b ; a = a->ai_next, b = b->ai_next) + { + ok(a->ai_flags == b->ai_flags, + "Wrong flags %d != %d\n", a->ai_flags, b->ai_flags); + ok(a->ai_family == b->ai_family, + "Wrong family %d != %d\n", a->ai_family, b->ai_family); + ok(a->ai_socktype == b->ai_socktype, + "Wrong socktype %d != %d\n", a->ai_socktype, b->ai_socktype); + ok(a->ai_protocol == b->ai_protocol, + "Wrong protocol %d != %d\n", a->ai_protocol, b->ai_protocol); + ok(a->ai_addrlen == b->ai_addrlen, + "Wrong addrlen %lu != %lu\n", a->ai_addrlen, b->ai_addrlen); + ok(!memcmp(a->ai_addr, b->ai_addr, min(a->ai_addrlen, b->ai_addrlen)), + "Wrong address data\n"); + if (a->ai_canonname && b->ai_canonname) + { + ok(!strcmp(a->ai_canonname, b->ai_canonname), "Wrong canonical name '%s' != '%s'\n", + a->ai_canonname, b->ai_canonname); + } + else + ok(!a->ai_canonname && !b->ai_canonname, "Expected both names absent (%p != %p)\n", + a->ai_canonname, b->ai_canonname); + } + ok(!a && !b, "Expected both addresses null (%p != %p)\n", a, b); +} + +static void compare_addrinfow (ADDRINFOW *a, ADDRINFOW *b) +{ + for (; a && b ; a = a->ai_next, b = b->ai_next) + { + ok(a->ai_flags == b->ai_flags, + "Wrong flags %d != %d\n", a->ai_flags, b->ai_flags); + ok(a->ai_family == b->ai_family, + "Wrong family %d != %d\n", a->ai_family, b->ai_family); + ok(a->ai_socktype == b->ai_socktype, + "Wrong socktype %d != %d\n", a->ai_socktype, b->ai_socktype); + ok(a->ai_protocol == b->ai_protocol, + "Wrong protocol %d != %d\n", a->ai_protocol, b->ai_protocol); + ok(a->ai_addrlen == b->ai_addrlen, + "Wrong addrlen %lu != %lu\n", a->ai_addrlen, b->ai_addrlen); + ok(!memcmp(a->ai_addr, b->ai_addr, min(a->ai_addrlen, b->ai_addrlen)), + "Wrong address data\n"); + if (a->ai_canonname && b->ai_canonname) + { + ok(!lstrcmpW(a->ai_canonname, b->ai_canonname), "Wrong canonical name '%s' != '%s'\n", + wine_dbgstr_w(a->ai_canonname), wine_dbgstr_w(b->ai_canonname)); + } + else + ok(!a->ai_canonname && !b->ai_canonname, "Expected both names absent (%p != %p)\n", + a->ai_canonname, b->ai_canonname); + } + ok(!a && !b, "Expected both addresses null (%p != %p)\n", a, b); +} + /**************** Server utility functions ***************/ /* @@ -5375,7 +5431,7 @@ static void test_GetAddrInfoW(void) {'n','x','d','o','m','a','i','n','.','c','o','d','e','w','e','a','v','e','r','s','.','c','o','m',0}; static const WCHAR zero[] = {'0',0}; int i, ret; - ADDRINFOW *result, *p, hint; + ADDRINFOW *result, *result2, *p, hint; if (!pGetAddrInfoW || !pFreeAddrInfoW) { @@ -5399,25 +5455,27 @@ static void test_GetAddrInfoW(void) ret = pGetAddrInfoW(NULL, zero, NULL, &result); ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); ok(result != NULL, "GetAddrInfoW failed\n"); - pFreeAddrInfoW(result); - result = NULL; - ret = pGetAddrInfoW(NULL, empty, NULL, &result); + result2 = NULL; + ret = pGetAddrInfoW(NULL, empty, NULL, &result2); ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); - ok(result != NULL, "GetAddrInfoW failed\n"); + ok(result2 != NULL, "GetAddrInfoW failed\n"); + compare_addrinfow(result, result2); pFreeAddrInfoW(result); + pFreeAddrInfoW(result2); result = NULL; ret = pGetAddrInfoW(empty, zero, NULL, &result); ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); ok(result != NULL, "GetAddrInfoW failed\n"); - pFreeAddrInfoW(result); - result = NULL; - ret = pGetAddrInfoW(empty, empty, NULL, &result); + result2 = NULL; + ret = pGetAddrInfoW(empty, empty, NULL, &result2); ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); - ok(result != NULL, "GetAddrInfoW failed\n"); + ok(result2 != NULL, "GetAddrInfoW failed\n"); + compare_addrinfow(result, result2); pFreeAddrInfoW(result); + pFreeAddrInfoW(result2); result = NULL; ret = pGetAddrInfoW(localhost, NULL, NULL, &result); @@ -5514,7 +5572,7 @@ static void test_GetAddrInfoW(void) static void test_getaddrinfo(void) { int i, ret; - ADDRINFOA *result, *p, hint; + ADDRINFOA *result, *result2, *p, hint; if (!pgetaddrinfo || !pfreeaddrinfo) { @@ -5538,25 +5596,27 @@ static void test_getaddrinfo(void) ret = pgetaddrinfo(NULL, "0", NULL, &result); ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); ok(result != NULL, "getaddrinfo failed\n"); - pfreeaddrinfo(result); - result = NULL; - ret = pgetaddrinfo(NULL, "", NULL, &result); + result2 = NULL; + ret = pgetaddrinfo(NULL, "", NULL, &result2); ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); - ok(result != NULL, "getaddrinfo failed\n"); + ok(result2 != NULL, "getaddrinfo failed\n"); + compare_addrinfo(result, result2); pfreeaddrinfo(result); + pfreeaddrinfo(result2); result = NULL; ret = pgetaddrinfo("", "0", NULL, &result); ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); ok(result != NULL, "getaddrinfo failed\n"); - pfreeaddrinfo(result); - result = NULL; - ret = pgetaddrinfo("", "", NULL, &result); + result2 = NULL; + ret = pgetaddrinfo("", "", NULL, &result2); ok(!ret, "getaddrinfo failed with %d\n", WSAGetLastError()); - ok(result != NULL, "getaddrinfo failed\n"); + ok(result2 != NULL, "getaddrinfo failed\n"); + compare_addrinfo(result, result2); pfreeaddrinfo(result); + pfreeaddrinfo(result2); result = NULL; ret = pgetaddrinfo("localhost", NULL, NULL, &result);
1
0
0
0
Matteo Bruni : d3dx9/tests: Use a valid version tag for the "empty" shader.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: 772d660e280d7664f03a040aafe2cab7eba11066 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=772d660e280d7664f03a040aa…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Feb 18 22:17:03 2014 +0100 d3dx9/tests: Use a valid version tag for the "empty" shader. --- dlls/d3dx9_36/tests/shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c index 363dd4e..74ada6e 100644 --- a/dlls/d3dx9_36/tests/shader.c +++ b/dlls/d3dx9_36/tests/shader.c @@ -27,7 +27,7 @@ static const DWORD shader_zero[] = {0x0}; static const DWORD shader_invalid[] = {0xeeee0100}; -static const DWORD shader_empty[] = {0xfffeffff, 0x0000ffff}; +static const DWORD shader_empty[] = {0xfffe0200, 0x0000ffff}; static const DWORD simple_fx[] = {0x46580000, 0x0002fffe, FCC_TEXT, 0x00000000, 0x0000ffff};
1
0
0
0
Matteo Bruni : d3dx9/tests: Add a test for constant tables in FX20 shaders.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: b74fc45b8137ae1338a772d2fe5598edabd1b1de URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b74fc45b8137ae1338a772d2f…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Feb 18 22:17:02 2014 +0100 d3dx9/tests: Add a test for constant tables in FX20 shaders. --- dlls/d3dx9_36/tests/shader.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c index 4406cd1..363dd4e 100644 --- a/dlls/d3dx9_36/tests/shader.c +++ b/dlls/d3dx9_36/tests/shader.c @@ -279,6 +279,25 @@ static const D3DXCONSTANT_DESC ctab_samplers_expected[] = { {"sampler2", D3DXRS_SAMPLER, 3, 1, D3DXPC_OBJECT, D3DXPT_SAMPLER3D, 1, 1, 1, 0, 4, NULL}, {"notsampler", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 4, 1, 0, 16, NULL}}; +static const DWORD fx_shader_with_ctab[] = +{ + 0x46580200, /* FX20 */ + 0x002efffe, FCC_CTAB, /* CTAB comment */ + 0x0000001c, 0x000000a4, 0xfffe0300, 0x00000003, 0x0000001c, 0x20008100, /* Header */ + 0x0000009c, + 0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000, /* Constant 1 desc */ + 0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000, /* Constant 2 desc */ + 0x00000090, 0x00040002, 0x00000003, 0x00000080, 0x00000000, /* Constant 3 desc */ + 0x736e6f43, 0x746e6174, 0xabab0031, /* Constant 1 name string */ + 0x00030001, 0x00040001, 0x00000001, 0x00000000, /* Constant 1 type desc */ + 0x736e6f43, 0x746e6174, 0xabab0032, /* Constant 2 name string */ + 0x00030003, 0x00040004, 0x00000001, 0x00000000, /* Constant 2 & 3 type desc */ + 0x736e6f43, 0x746e6174, 0xabab0033, /* Constant 3 name string */ + 0x335f7376, 0xab00305f, /* Target name string */ + 0x656e6957, 0x6f727020, 0x7463656a, 0xababab00, /* Creator name string */ + 0x0000ffff /* END */ +}; + static void test_get_shader_size(void) { UINT shader_size, expected; @@ -421,6 +440,14 @@ static void test_get_shader_constant_table_ex(void) "Got result %x, expected %x (D3DXERR_INVALIDDATA)\n", hr, D3DXERR_INVALIDDATA); if (constant_table) ID3DXConstantTable_Release(constant_table); + hr = D3DXGetShaderConstantTableEx(simple_fx, 0, &constant_table); + ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n"); + + hr = D3DXGetShaderConstantTableEx(simple_tx, 0, &constant_table); + ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n"); + hr = D3DXGetShaderConstantTableEx(shader_with_ctab, 0, &constant_table); ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr); ok(constant_table != NULL, "D3DXGetShaderConstantTableEx() failed, got NULL\n"); @@ -534,6 +561,10 @@ static void test_get_shader_constant_table_ex(void) ID3DXConstantTable_Release(constant_table); } + + hr = D3DXGetShaderConstantTableEx(fx_shader_with_ctab, 0, &constant_table); + ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK).\n", hr); + ok(!constant_table, "D3DXGetShaderConstantTableEx() returned a non-NULL constant table.\n"); } static void test_constant_table(const char *test_name, const DWORD *ctable_fn,
1
0
0
0
Matteo Bruni : d3dx9: Allow loading float "FOURCC" DDS files.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: fa8a0dc7f61715a093a3b2e4453e843a4129476e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa8a0dc7f61715a093a3b2e44…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Feb 18 22:17:01 2014 +0100 d3dx9: Allow loading float "FOURCC" DDS files. --- dlls/d3dx9_36/surface.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 71c43bd..94301e8 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -153,7 +153,13 @@ static D3DFORMAT dds_fourcc_to_d3dformat(DWORD fourcc) MAKEFOURCC('D','X','T','2'), MAKEFOURCC('D','X','T','3'), MAKEFOURCC('D','X','T','4'), - MAKEFOURCC('D','X','T','5') + MAKEFOURCC('D','X','T','5'), + D3DFMT_R16F, + D3DFMT_G16R16F, + D3DFMT_A16B16G16R16F, + D3DFMT_R32F, + D3DFMT_G32R32F, + D3DFMT_A32B32G32R32F, }; for (i = 0; i < sizeof(known_fourcc) / sizeof(known_fourcc[0]); i++)
1
0
0
0
Matteo Bruni : d3dx9: Add some more float pixel formats.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: 596bb77862dff8868fa191f6aefcdfe48dd054f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=596bb77862dff8868fa191f6a…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Feb 18 22:17:00 2014 +0100 d3dx9: Add some more float pixel formats. --- dlls/d3dx9_36/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/d3dx9_36/util.c b/dlls/d3dx9_36/util.c index ea75dfa..bba8514 100644 --- a/dlls/d3dx9_36/util.c +++ b/dlls/d3dx9_36/util.c @@ -81,7 +81,11 @@ static const struct pixel_format_desc formats[] = {D3DFMT_DXT3, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL }, {D3DFMT_DXT4, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL }, {D3DFMT_DXT5, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL }, + {D3DFMT_R16F, { 0, 16, 0, 0}, { 0, 0, 0, 0}, 2, 1, 1, 2, FORMAT_ARGBF16, NULL, NULL }, + {D3DFMT_G16R16F, { 0, 16, 16, 0}, { 0, 0, 16, 0}, 4, 1, 1, 4, FORMAT_ARGBF16, NULL, NULL }, {D3DFMT_A16B16G16R16F, {16, 16, 16, 16}, {48, 0, 16, 32}, 8, 1, 1, 8, FORMAT_ARGBF16, NULL, NULL }, + {D3DFMT_R32F, { 0, 32, 0, 0}, { 0, 0, 0, 0}, 4, 1, 1, 4, FORMAT_ARGBF, NULL, NULL }, + {D3DFMT_G32R32F, { 0, 32, 32, 0}, { 0, 0, 32, 0}, 8, 1, 1, 8, FORMAT_ARGBF, NULL, NULL }, {D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL }, {D3DFMT_P8, { 8, 8, 8, 8}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_INDEX, NULL, index_to_rgba}, /* marks last element */
1
0
0
0
Matteo Bruni : d3dx9/tests: Create A8L8 and DXTn textures instead of plain surfaces.
by Alexandre Julliard
20 Feb '14
20 Feb '14
Module: wine Branch: master Commit: e5d9be5eaf38b6b01b29185443069497fef97531 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5d9be5eaf38b6b01b2918544…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Feb 18 22:16:59 2014 +0100 d3dx9/tests: Create A8L8 and DXTn textures instead of plain surfaces. Creating them as plain surfaces fails on my Nvidia Win7 system. --- dlls/d3dx9_36/tests/surface.c | 55 +++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c index 283fc96..2ddc704 100644 --- a/dlls/d3dx9_36/tests/surface.c +++ b/dlls/d3dx9_36/tests/surface.c @@ -981,11 +981,14 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) } /* A8L8 */ - hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2, 2, D3DFMT_A8L8, D3DPOOL_DEFAULT, &surf, NULL); + hr = IDirect3DDevice9_CreateTexture(device, 2, 2, 1, 0, D3DFMT_A8L8, D3DPOOL_MANAGED, &tex, NULL); if (FAILED(hr)) - skip("Failed to create A8L8 surface, hr %#x.\n", hr); + skip("Failed to create A8L8 texture, hr %#x.\n", hr); else { + hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &surf); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); + hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8r3g3b2, D3DFMT_A8R3G3B2, 4, NULL, &rect, D3DX_FILTER_NONE, 0); ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); @@ -1070,7 +1073,8 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) hr = IDirect3DSurface9_UnlockRect(surf); ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr); - check_release((IUnknown*)surf, 0); + check_release((IUnknown*)surf, 1); + check_release((IUnknown*)tex, 0); } /* DXT1, DXT2, DXT3, DXT4, DXT5 */ @@ -1082,58 +1086,73 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) hr = D3DXLoadSurfaceFromFileInMemory(surf, NULL, NULL, dds_24bit, sizeof(dds_24bit), NULL, D3DX_FILTER_NONE, 0, NULL); ok(SUCCEEDED(hr), "Failed to load surface, hr %#x.\n", hr); - hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_DXT2, D3DPOOL_SYSTEMMEM, &newsurf, NULL); + hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT2, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT2 surface, hr %#x.\n", hr); + skip("Failed to create DXT2 texture, hr %#x.\n", hr); else { + hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT2 format.\n"); - check_release((IUnknown*)newsurf, 0); + check_release((IUnknown*)newsurf, 1); + check_release((IUnknown*)tex, 0); } - hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_DXT3, D3DPOOL_SYSTEMMEM, &newsurf, NULL); + hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT3, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT3 surface, hr %#x.\n", hr); + skip("Failed to create DXT3 texture, hr %#x.\n", hr); else { + hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT3 format.\n"); - check_release((IUnknown*)newsurf, 0); + check_release((IUnknown*)newsurf, 1); + check_release((IUnknown*)tex, 0); } - hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_DXT4, D3DPOOL_SYSTEMMEM, &newsurf, NULL); + hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT4, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT4 surface, hr %#x.\n", hr); + skip("Failed to create DXT4 texture, hr %#x.\n", hr); else { + hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT4 format.\n"); - check_release((IUnknown*)newsurf, 0); + check_release((IUnknown*)newsurf, 1); + check_release((IUnknown*)tex, 0); } - hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_DXT5, D3DPOOL_SYSTEMMEM, &newsurf, NULL); + hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT5, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT5 surface, hr %#x.\n", hr); + skip("Failed to create DXT5 texture, hr %#x.\n", hr); else { + hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n"); - check_release((IUnknown*)newsurf, 0); + check_release((IUnknown*)newsurf, 1); + check_release((IUnknown*)tex, 0); } - hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_DXT1, D3DPOOL_SYSTEMMEM, &newsurf, NULL); + hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT1, D3DPOOL_SYSTEMMEM, &tex, NULL); if (FAILED(hr)) - skip("Failed to create DXT1 surface, hr %#x.\n", hr); + skip("Failed to create DXT1 texture, hr %#x.\n", hr); else { + hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); + ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT1 format.\n"); hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels from DXT1 format.\n"); - check_release((IUnknown*)newsurf, 0); + check_release((IUnknown*)newsurf, 1); + check_release((IUnknown*)tex, 0); } check_release((IUnknown*)surf, 0);
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
51
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
Results per page:
10
25
50
100
200