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
May 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
945 discussions
Start a n
N
ew thread
Marcus Meissner : setupapi: Mark internal symbols with hidden visibility.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 82376660d188be00053da339b08986fcb5380c80 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82376660d188be00053da339b…
Author: Marcus Meissner <meissner(a)suse.de> Date: Fri May 13 18:17:44 2011 +0200 setupapi: Mark internal symbols with hidden visibility. --- dlls/setupapi/setupapi_private.h | 18 ++++---- dlls/shdocvw/shdocvw.h | 90 +++++++++++++++++++------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h index 70394e2..5cdedb6 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -43,7 +43,7 @@ #define REGPART_RENAME "\\Rename" #define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager" -extern HINSTANCE SETUPAPI_hInstance; +extern HINSTANCE SETUPAPI_hInstance DECLSPEC_HIDDEN; static inline WCHAR *strdupW( const WCHAR *str ) { @@ -83,10 +83,10 @@ static inline WCHAR *strdupAtoW( const char *str ) /* string substitutions */ struct inf_file; -extern const WCHAR *DIRID_get_string( int dirid ); -extern const WCHAR *PARSER_get_inf_filename( HINF hinf ); -extern WCHAR *PARSER_get_src_root( HINF hinf ); -extern WCHAR *PARSER_get_dest_dir( INFCONTEXT *context ); +extern const WCHAR *DIRID_get_string( int dirid ) DECLSPEC_HIDDEN; +extern const WCHAR *PARSER_get_inf_filename( HINF hinf ) DECLSPEC_HIDDEN; +extern WCHAR *PARSER_get_src_root( HINF hinf ) DECLSPEC_HIDDEN; +extern WCHAR *PARSER_get_dest_dir( INFCONTEXT *context ) DECLSPEC_HIDDEN; /* support for Ascii queue callback functions */ @@ -96,15 +96,15 @@ struct callback_WtoA_context PSP_FILE_CALLBACK_A orig_handler; }; -UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, UINT_PTR, UINT_PTR ); +UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, UINT_PTR, UINT_PTR ) DECLSPEC_HIDDEN; /* from msvcrt/sys/stat.h */ #define _S_IWRITE 0x0080 #define _S_IREAD 0x0100 -extern OSVERSIONINFOW OsVersionInfo; +extern OSVERSIONINFOW OsVersionInfo DECLSPEC_HIDDEN; -extern BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ); -extern void cleanup_fake_dlls(void); +extern BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) DECLSPEC_HIDDEN; +extern void cleanup_fake_dlls(void) DECLSPEC_HIDDEN; #endif /* __SETUPAPI_PRIVATE_H */ diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index 7a68499..fd234d8 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -50,7 +50,7 @@ * Shell Instance Objects */ extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid, - REFIID riid, LPVOID *ppvClassObj); + REFIID riid, LPVOID *ppvClassObj) DECLSPEC_HIDDEN; /********************************************************************** * WebBrowser declaration for SHDOCVW.DLL @@ -208,73 +208,73 @@ struct InternetExplorer { IEDocHost *doc_host; }; -void WebBrowser_OleObject_Init(WebBrowser*); -void WebBrowser_ViewObject_Init(WebBrowser*); -void WebBrowser_Persist_Init(WebBrowser*); -void WebBrowser_ClassInfo_Init(WebBrowser*); +void WebBrowser_OleObject_Init(WebBrowser*) DECLSPEC_HIDDEN; +void WebBrowser_ViewObject_Init(WebBrowser*) DECLSPEC_HIDDEN; +void WebBrowser_Persist_Init(WebBrowser*) DECLSPEC_HIDDEN; +void WebBrowser_ClassInfo_Init(WebBrowser*) DECLSPEC_HIDDEN; -void WebBrowser_OleObject_Destroy(WebBrowser*); +void WebBrowser_OleObject_Destroy(WebBrowser*) DECLSPEC_HIDDEN; -void DocHost_Init(DocHost*,IDispatch*,const IDocHostContainerVtbl*); -void DocHost_ClientSite_Init(DocHost*); -void DocHost_Frame_Init(DocHost*); -void release_dochost_client(DocHost*); +void DocHost_Init(DocHost*,IDispatch*,const IDocHostContainerVtbl*) DECLSPEC_HIDDEN; +void DocHost_ClientSite_Init(DocHost*) DECLSPEC_HIDDEN; +void DocHost_Frame_Init(DocHost*) DECLSPEC_HIDDEN; +void release_dochost_client(DocHost*) DECLSPEC_HIDDEN; -void DocHost_Release(DocHost*); -void DocHost_ClientSite_Release(DocHost*); +void DocHost_Release(DocHost*) DECLSPEC_HIDDEN; +void DocHost_ClientSite_Release(DocHost*) DECLSPEC_HIDDEN; -void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*); -void ConnectionPointContainer_Destroy(ConnectionPointContainer*); +void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*) DECLSPEC_HIDDEN; +void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN; -void HlinkFrame_Init(HlinkFrame*,IUnknown*,DocHost*); -BOOL HlinkFrame_QI(HlinkFrame*,REFIID,void**); +void HlinkFrame_Init(HlinkFrame*,IUnknown*,DocHost*) DECLSPEC_HIDDEN; +BOOL HlinkFrame_QI(HlinkFrame*,REFIID,void**) DECLSPEC_HIDDEN; -HRESULT ShellBrowser_Create(IShellBrowser**); -HRESULT WebBrowserV1_Create(IUnknown*,REFIID,void**); -HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**); +HRESULT ShellBrowser_Create(IShellBrowser**) DECLSPEC_HIDDEN; +HRESULT WebBrowserV1_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; +HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; -void create_doc_view_hwnd(DocHost*); -void deactivate_document(DocHost*); -HRESULT dochost_object_available(DocHost*,IUnknown*); -void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*); -HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*); -HRESULT go_home(DocHost*); -void set_doc_state(DocHost*,READYSTATE); -HRESULT get_location_url(DocHost*,BSTR*); -void handle_navigation_error(DocHost*,HRESULT,BSTR,IHTMLWindow2*); +void create_doc_view_hwnd(DocHost*) DECLSPEC_HIDDEN; +void deactivate_document(DocHost*) DECLSPEC_HIDDEN; +HRESULT dochost_object_available(DocHost*,IUnknown*) DECLSPEC_HIDDEN; +void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*) DECLSPEC_HIDDEN; +HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*) DECLSPEC_HIDDEN; +HRESULT go_home(DocHost*) DECLSPEC_HIDDEN; +void set_doc_state(DocHost*,READYSTATE) DECLSPEC_HIDDEN; +HRESULT get_location_url(DocHost*,BSTR*) DECLSPEC_HIDDEN; +void handle_navigation_error(DocHost*,HRESULT,BSTR,IHTMLWindow2*) DECLSPEC_HIDDEN; #define WM_DOCHOSTTASK (WM_USER+0x300) -void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL); -LRESULT process_dochost_task(DocHost*,LPARAM); +void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL) DECLSPEC_HIDDEN; +LRESULT process_dochost_task(DocHost*,LPARAM) DECLSPEC_HIDDEN; -HRESULT InternetExplorer_Create(IUnknown*,REFIID,void**); -void InternetExplorer_WebBrowser_Init(InternetExplorer*); +HRESULT InternetExplorer_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; +void InternetExplorer_WebBrowser_Init(InternetExplorer*) DECLSPEC_HIDDEN; -void released_obj(void); +void released_obj(void) DECLSPEC_HIDDEN; -HRESULT CUrlHistory_Create(IUnknown*,REFIID,void**); +HRESULT CUrlHistory_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; -HRESULT InternetShortcut_Create(IUnknown*,REFIID,void**); +HRESULT InternetShortcut_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; -HRESULT TaskbarList_Create(IUnknown*,REFIID,void**); +HRESULT TaskbarList_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; /********************************************************************** * Dll lifetime tracking declaration for shdocvw.dll */ -extern LONG SHDOCVW_refCount; +extern LONG SHDOCVW_refCount DECLSPEC_HIDDEN; static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount ); } static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); } -extern HINSTANCE shdocvw_hinstance; -extern void register_iewindow_class(void); -extern void unregister_iewindow_class(void); -extern HRESULT update_ie_statustext(InternetExplorer*, LPCWSTR); +extern HINSTANCE shdocvw_hinstance DECLSPEC_HIDDEN; +extern void register_iewindow_class(void) DECLSPEC_HIDDEN; +extern void unregister_iewindow_class(void) DECLSPEC_HIDDEN; +extern HRESULT update_ie_statustext(InternetExplorer*, LPCWSTR) DECLSPEC_HIDDEN; -HRESULT register_class_object(BOOL); -HRESULT get_typeinfo(ITypeInfo**); -DWORD register_iexplore(BOOL); +HRESULT register_class_object(BOOL) DECLSPEC_HIDDEN; +HRESULT get_typeinfo(ITypeInfo**) DECLSPEC_HIDDEN; +DWORD register_iexplore(BOOL) DECLSPEC_HIDDEN; -const char *debugstr_variant(const VARIANT*); +const char *debugstr_variant(const VARIANT*) DECLSPEC_HIDDEN; /* memory allocation functions */
1
0
0
0
Henri Verbeet : ddraw/tests: Fix the depth clamping test.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 1db6a7e4507b5d1d35a366d0ee71617e428f32eb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1db6a7e4507b5d1d35a366d0e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 23 22:11:37 2011 +0200 ddraw/tests: Fix the depth clamping test. --- dlls/ddraw/tests/visual.c | 109 ++++++++++++++++++++++----------------------- 1 files changed, 53 insertions(+), 56 deletions(-) diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c index 2b4cf23..5eec1c8 100644 --- a/dlls/ddraw/tests/visual.c +++ b/dlls/ddraw/tests/visual.c @@ -125,19 +125,7 @@ static BOOL createObjects(void) if (FAILED(hr)) goto err; hr = IDirect3D7_CreateDevice(Direct3D, &IID_IDirect3DTnLHalDevice, Surface, &Direct3DDevice); - if(FAILED(hr)) - { - trace("Creating a TnLHal Device failed, trying HAL\n"); - hr = IDirect3D7_CreateDevice(Direct3D, &IID_IDirect3DHALDevice, Surface, &Direct3DDevice); - if(FAILED(hr)) - { - trace("Creating a HAL device failed, trying Ref\n"); - hr = IDirect3D7_CreateDevice(Direct3D, &IID_IDirect3DRefDevice, Surface, &Direct3DDevice); - if (SUCCEEDED(hr)) - refdevice = TRUE; - } - } - if(!Direct3DDevice) goto err; + if (FAILED(hr) || !Direct3DDevice) goto err; return TRUE; err: @@ -2801,55 +2789,58 @@ out: } /* This test tests depth clamping / clipping behaviour: - * - When D3DRS_CLIPPING is disabled depth values are *clamped* to the - * minimum/maximum z value. + * - With software vertex processing, depth values are clamped to the + * minimum / maximum z value when D3DRS_CLIPPING is disabled, and clipped + * when D3DRS_CLIPPING is enabled. Pretransformed vertices behave the + * same as regular vertices here. + * - With hardware vertex processing, D3DRS_CLIPPING seems to be ignored. + * Normal vertices are always clipped. Pretransformed vertices are + * clipped when D3DPMISCCAPS_CLIPTLVERTS is set, clamped when it isn't. * - The viewport's MinZ/MaxZ is irrelevant for this. - * - When D3DRS_CLIPPING is enabled depth values are clipped. - * - Pretransformed vertices behave the same as regular vertices. */ static void depth_clamp_test(IDirect3DDevice7 *device) { struct tvertex quad1[] = { - { 0, 0, 5.0f, 1.0, 0xff002b7f}, - { 640, 0, 5.0f, 1.0, 0xff002b7f}, - { 0, 480, 5.0f, 1.0, 0xff002b7f}, - { 640, 480, 5.0f, 1.0, 0xff002b7f}, + { 0.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f}, + {640.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f}, + { 0.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f}, + {640.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f}, }; struct tvertex quad2[] = { - { 0, 300, 10.0f, 1.0, 0xfff9e814}, - { 640, 300, 10.0f, 1.0, 0xfff9e814}, - { 0, 360, 10.0f, 1.0, 0xfff9e814}, - { 640, 360, 10.0f, 1.0, 0xfff9e814}, + { 0.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814}, + {640.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814}, + { 0.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814}, + {640.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814}, }; - struct vertex quad3[] = + struct tvertex quad3[] = { - {-0.65, 0.55, 5.0f, 0xffffffff}, - {-0.35, 0.55, 5.0f, 0xffffffff}, - {-0.65, 0.15, 5.0f, 0xffffffff}, - {-0.35, 0.15, 5.0f, 0xffffffff}, + {112.0f, 108.0f, 5.0f, 1.0f, 0xffffffff}, + {208.0f, 108.0f, 5.0f, 1.0f, 0xffffffff}, + {112.0f, 204.0f, 5.0f, 1.0f, 0xffffffff}, + {208.0f, 204.0f, 5.0f, 1.0f, 0xffffffff}, }; - struct vertex quad4[] = + struct tvertex quad4[] = { - {-0.87, 0.83, 10.0f, 0xffffffff}, - {-0.65, 0.83, 10.0f, 0xffffffff}, - {-0.87, 0.55, 10.0f, 0xffffffff}, - {-0.65, 0.55, 10.0f, 0xffffffff}, + { 42.0f, 41.0f, 10.0f, 1.0f, 0xffffffff}, + {112.0f, 41.0f, 10.0f, 1.0f, 0xffffffff}, + { 42.0f, 108.0f, 10.0f, 1.0f, 0xffffffff}, + {112.0f, 108.0f, 10.0f, 1.0f, 0xffffffff}, }; struct vertex quad5[] = { - { -0.5, 0.5, 10.0f, 0xff14f914}, - { 0.5, 0.5, 10.0f, 0xff14f914}, - { -0.5, -0.5, 10.0f, 0xff14f914}, - { 0.5, -0.5, 10.0f, 0xff14f914}, + { -0.5f, 0.5f, 10.0f, 0xff14f914}, + { 0.5f, 0.5f, 10.0f, 0xff14f914}, + { -0.5f, -0.5f, 10.0f, 0xff14f914}, + { 0.5f, -0.5f, 10.0f, 0xff14f914}, }; - struct tvertex quad6[] = + struct vertex quad6[] = { - { 0, 120, 10.0f, 1.0, 0xfff91414}, - { 640, 120, 10.0f, 1.0, 0xfff91414}, - { 0, 180, 10.0f, 1.0, 0xfff91414}, - { 640, 180, 10.0f, 1.0, 0xfff91414}, + { -1.0f, 0.5f, 10.0f, 0xfff91414}, + { 1.0f, 0.5f, 10.0f, 0xfff91414}, + { -1.0f, 0.25f, 10.0f, 0xfff91414}, + { 1.0f, 0.25f, 10.0f, 0xfff91414}, }; D3DVIEWPORT7 vp; @@ -2866,7 +2857,7 @@ static void depth_clamp_test(IDirect3DDevice7 *device) hr = IDirect3DDevice7_SetViewport(device, &vp); ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); - hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0, 0); + hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff00ff00, 1.0, 0); ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); @@ -2885,34 +2876,40 @@ static void depth_clamp_test(IDirect3DDevice7 *device) ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad2, 4, 0); ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); - hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad3, 4, 0); + + hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, TRUE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + + hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad3, 4, 0); ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); - hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad4, 4, 0); + hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad4, 4, 0); ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); - hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, TRUE); + hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, FALSE); ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad5, 4, 0); ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); - hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZRHW | D3DFVF_DIFFUSE, quad6, 4, 0); + + hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_CLIPPING, TRUE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + + hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | D3DFVF_DIFFUSE, quad6, 4, 0); ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr); hr = IDirect3DDevice7_EndScene(device); ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); color = getPixelColor(device, 75, 75); - ok(color_match(color, 0x00ffffff, 1), "color 0x%08x.\n", color); + todo_wine ok(color_match(color, 0x00ffffff, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); color = getPixelColor(device, 150, 150); - ok(color_match(color, 0x00ffffff, 1) || - broken(color == 0x00f91414), /* Reference rasterizer */ - "color 0x%08x.\n", color); + todo_wine ok(color_match(color, 0x00ffffff, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); color = getPixelColor(device, 320, 240); - ok(color_match(color, 0x00002b7f, 1), "color 0x%08x.\n", color); + todo_wine ok(color_match(color, 0x00002b7f, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); color = getPixelColor(device, 320, 330); - ok(color_match(color, 0x00f9e814, 1), "color 0x%08x.\n", color); + todo_wine ok(color_match(color, 0x00f9e814, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); color = getPixelColor(device, 320, 330); - ok(color_match(color, 0x00f9e814, 1), "color 0x%08x.\n", color); + todo_wine ok(color_match(color, 0x00f9e814, 1) || color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); vp.dvMinZ = 0.0; vp.dvMaxZ = 1.0;
1
0
0
0
Henri Verbeet : d3d8/tests: Fix the depth clamping test.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 022db6808032da1ba7dcbfb5614791bbbb43fcc4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=022db6808032da1ba7dcbfb56…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 23 22:11:36 2011 +0200 d3d8/tests: Fix the depth clamping test. --- dlls/d3d8/tests/visual.c | 124 ++++++++++++++++++++++++++++------------------ 1 files changed, 75 insertions(+), 49 deletions(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 1f6a115..d2ab518 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -140,9 +140,10 @@ static IDirect3DDevice8 *init_d3d8(void) present_parameters.BackBufferHeight = 480; present_parameters.BackBufferFormat = D3DFMT_A8R8G8B8; present_parameters.EnableAutoDepthStencil = TRUE; - present_parameters.AutoDepthStencilFormat = D3DFMT_D16; + present_parameters.AutoDepthStencilFormat = D3DFMT_D24S8; - hr = IDirect3D8_CreateDevice(d3d8_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, present_parameters.hDeviceWindow, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr); + hr = IDirect3D8_CreateDevice(d3d8_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + present_parameters.hDeviceWindow, D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device_ptr); ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL || broken(hr == D3DERR_NOTAVAILABLE), "IDirect3D_CreateDevice returned: %#08x\n", hr); return device_ptr; @@ -1292,59 +1293,63 @@ static void texop_test(IDirect3DDevice8 *device) } /* This test tests depth clamping / clipping behaviour: - * - When D3DRS_CLIPPING is disabled depth values are *clamped* to the - * minimum/maximum z value. + * - With software vertex processing, depth values are clamped to the + * minimum / maximum z value when D3DRS_CLIPPING is disabled, and clipped + * when D3DRS_CLIPPING is enabled. Pretransformed vertices behave the + * same as regular vertices here. + * - With hardware vertex processing, D3DRS_CLIPPING seems to be ignored. + * Normal vertices are always clipped. Pretransformed vertices are + * clipped when D3DPMISCCAPS_CLIPTLVERTS is set, clamped when it isn't. * - The viewport's MinZ/MaxZ is irrelevant for this. - * - When D3DRS_CLIPPING is enabled depth values are clipped. - * - Pretransformed vertices behave the same as regular vertices. */ static void depth_clamp_test(IDirect3DDevice8 *device) { const struct tvertex quad1[] = { - { 0, 0, 5.0f, 1.0, 0xff002b7f}, - { 640, 0, 5.0f, 1.0, 0xff002b7f}, - { 0, 480, 5.0f, 1.0, 0xff002b7f}, - { 640, 480, 5.0f, 1.0, 0xff002b7f}, + { 0.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f}, + {640.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f}, + { 0.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f}, + {640.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f}, }; const struct tvertex quad2[] = { - { 0, 300, 10.0f, 1.0, 0xfff9e814}, - { 640, 300, 10.0f, 1.0, 0xfff9e814}, - { 0, 360, 10.0f, 1.0, 0xfff9e814}, - { 640, 360, 10.0f, 1.0, 0xfff9e814}, + { 0.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814}, + {640.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814}, + { 0.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814}, + {640.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814}, }; - const struct vertex quad3[] = + const struct tvertex quad3[] = { - {-0.65f, 0.55f, 5.0f, 0xffffffff}, - {-0.35f, 0.55f, 5.0f, 0xffffffff}, - {-0.65f, 0.15f, 5.0f, 0xffffffff}, - {-0.35f, 0.15f, 5.0f, 0xffffffff}, + {112.0f, 108.0f, 5.0f, 1.0f, 0xffffffff}, + {208.0f, 108.0f, 5.0f, 1.0f, 0xffffffff}, + {112.0f, 204.0f, 5.0f, 1.0f, 0xffffffff}, + {208.0f, 204.0f, 5.0f, 1.0f, 0xffffffff}, }; - const struct vertex quad4[] = + const struct tvertex quad4[] = { - {-0.87f, 0.83f, 10.0f, 0xffffffff}, - {-0.65f, 0.83f, 10.0f, 0xffffffff}, - {-0.87f, 0.55f, 10.0f, 0xffffffff}, - {-0.65f, 0.55f, 10.0f, 0xffffffff}, + { 42.0f, 41.0f, 10.0f, 1.0f, 0xffffffff}, + {112.0f, 41.0f, 10.0f, 1.0f, 0xffffffff}, + { 42.0f, 108.0f, 10.0f, 1.0f, 0xffffffff}, + {112.0f, 108.0f, 10.0f, 1.0f, 0xffffffff}, }; const struct vertex quad5[] = { - { -0.5, 0.5, 10.0f, 0xff14f914}, - { 0.5, 0.5, 10.0f, 0xff14f914}, - { -0.5, -0.5, 10.0f, 0xff14f914}, - { 0.5, -0.5, 10.0f, 0xff14f914}, + { -0.5f, 0.5f, 10.0f, 0xff14f914}, + { 0.5f, 0.5f, 10.0f, 0xff14f914}, + { -0.5f, -0.5f, 10.0f, 0xff14f914}, + { 0.5f, -0.5f, 10.0f, 0xff14f914}, }; - const struct tvertex quad6[] = + const struct vertex quad6[] = { - { 0, 120, 10.0f, 1.0, 0xfff91414}, - { 640, 120, 10.0f, 1.0, 0xfff91414}, - { 0, 180, 10.0f, 1.0, 0xfff91414}, - { 640, 180, 10.0f, 1.0, 0xfff91414}, + { -1.0f, 0.5f, 10.0f, 0xfff91414}, + { 1.0f, 0.5f, 10.0f, 0xfff91414}, + { -1.0f, 0.25f, 10.0f, 0xfff91414}, + { 1.0f, 0.25f, 10.0f, 0xfff91414}, }; D3DVIEWPORT8 vp; D3DCOLOR color; + D3DCAPS8 caps; HRESULT hr; vp.X = 0; @@ -1354,10 +1359,13 @@ static void depth_clamp_test(IDirect3DDevice8 *device) vp.MinZ = 0.0; vp.MaxZ = 7.5; + hr = IDirect3DDevice8_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetViewport(device, &vp); ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); - hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0, 0); + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff00ff00, 1.0, 0); ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, FALSE); @@ -1380,22 +1388,24 @@ static void depth_clamp_test(IDirect3DDevice8 *device) hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, sizeof(*quad2)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); - ok(SUCCEEDED(hr), "SetVertexShader failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, TRUE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, sizeof(*quad3)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, sizeof(*quad4)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, TRUE); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, FALSE); ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); + ok(SUCCEEDED(hr), "SetVertexShader failed, hr %#x.\n", hr); hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad5, sizeof(*quad5)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); - hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZRHW | D3DFVF_DIFFUSE); - ok(SUCCEEDED(hr), "SetVertexShader failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, TRUE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad6, sizeof(*quad6)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); @@ -1403,16 +1413,32 @@ static void depth_clamp_test(IDirect3DDevice8 *device) hr = IDirect3DDevice8_EndScene(device); ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); - color = getPixelColor(device, 75, 75); - ok(color_match(color, 0x00ffffff, 1), "color 0x%08x.\n", color); - color = getPixelColor(device, 150, 150); - ok(color_match(color, 0x00ffffff, 1), "color 0x%08x.\n", color); - color = getPixelColor(device, 320, 240); - ok(color_match(color, 0x00002b7f, 1), "color 0x%08x.\n", color); - color = getPixelColor(device, 320, 330); - ok(color_match(color, 0x00f9e814, 1), "color 0x%08x.\n", color); - color = getPixelColor(device, 320, 330); - ok(color_match(color, 0x00f9e814, 1), "color 0x%08x.\n", color); + if (caps.PrimitiveMiscCaps & D3DPMISCCAPS_CLIPTLVERTS) + { + color = getPixelColor(device, 75, 75); + todo_wine ok(color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 150, 150); + todo_wine ok(color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 320, 240); + todo_wine ok(color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 320, 330); + todo_wine ok(color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 320, 330); + todo_wine ok(color_match(color, 0x0000ff00, 1), "color 0x%08x.\n", color); + } + else + { + color = getPixelColor(device, 75, 75); + ok(color_match(color, 0x00ffffff, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 150, 150); + ok(color_match(color, 0x00ffffff, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 320, 240); + ok(color_match(color, 0x00002b7f, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 320, 330); + ok(color_match(color, 0x00f9e814, 1), "color 0x%08x.\n", color); + color = getPixelColor(device, 320, 330); + ok(color_match(color, 0x00f9e814, 1), "color 0x%08x.\n", color); + } hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
1
0
0
0
Henri Verbeet : ddraw: Don't touch the window during mode setting if we' re not in exclusive mode.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: f147c1e9289185cc3c523a0537c2bcee87744f49 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f147c1e9289185cc3c523a053…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 23 22:11:34 2011 +0200 ddraw: Don't touch the window during mode setting if we're not in exclusive mode. --- dlls/ddraw/ddraw.c | 9 +++++++-- dlls/ddraw/tests/d3d.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 4a7e5ed..58eb452 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -883,8 +883,13 @@ static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD /* TODO: Lose the primary surface */ hr = wined3d_device_set_display_mode(ddraw->wined3d_device, 0, &Mode); - wined3d_device_restore_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window); - wined3d_device_setup_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window, Width, Height); + + if (ddraw->cooperative_level & DDSCL_EXCLUSIVE) + { + wined3d_device_restore_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window); + wined3d_device_setup_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window, Width, Height); + } + LeaveCriticalSection(&ddraw_cs); switch(hr) { diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index ff208c7..9ac3ffa 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -4046,7 +4046,7 @@ static void test_coop_level_mode_set(void) ok(SUCCEEDED(hr), "SetDipslayMode failed, hr %#x.\n", hr); GetWindowRect(window, &r); - todo_wine ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, r.left, r.top, r.right, r.bottom);
1
0
0
0
Henri Verbeet : ddraw/tests: Add a test for mode settings calls with different coop levels.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 43aac32fd572982ae65a8c0a3cb7d64a87ae86cb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43aac32fd572982ae65a8c0a3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon May 23 22:11:33 2011 +0200 ddraw/tests: Add a test for mode settings calls with different coop levels. --- dlls/ddraw/tests/d3d.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 87 insertions(+), 0 deletions(-) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 6511a26..ff208c7 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -3983,6 +3983,92 @@ static void test_redundant_mode_set(void) DestroyWindow(window); } + +static void test_coop_level_mode_set(void) +{ + RECT fullscreen_rect, r, s; + IDirectDraw7 *ddraw7; + HWND window; + HRESULT hr; + ULONG ref; + + hr = pDirectDrawCreateEx(NULL, (void **)&ddraw7, &IID_IDirectDraw7, NULL); + if (FAILED(hr)) + { + skip("Failed to create IDirectDraw7 object (%#x), skipping tests.\n", hr); + return; + } + + window = CreateWindowA("static", "d3d7_test", WS_OVERLAPPEDWINDOW, + 0, 0, 100, 100, 0, 0, 0, 0); + + SetRect(&fullscreen_rect, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); + SetRect(&s, 0, 0, 640, 480); + + hr = IDirectDraw7_SetCooperativeLevel(ddraw7, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + if (FAILED(hr)) + { + IDirectDraw7_Release(ddraw7); + DestroyWindow(window); + return; + } + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + hr = IDirectDraw7_SetDisplayMode(ddraw7, 640, 480, 32, 0, 0); + ok(SUCCEEDED(hr), "SetDipslayMode failed, hr %#x.\n", hr); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &s), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + s.left, s.top, s.right, s.bottom, + r.left, r.top, r.right, r.bottom); + + hr = IDirectDraw_RestoreDisplayMode(ddraw7); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + hr = IDirectDraw7_SetCooperativeLevel(ddraw7, window, DDSCL_NORMAL); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + hr = IDirectDraw7_SetDisplayMode(ddraw7, 640, 480, 32, 0, 0); + ok(SUCCEEDED(hr), "SetDipslayMode failed, hr %#x.\n", hr); + + GetWindowRect(window, &r); + todo_wine ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + hr = IDirectDraw_RestoreDisplayMode(ddraw7); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + ref = IDirectDraw7_Release(ddraw7); + ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + DestroyWindow(window); +} + START_TEST(d3d) { init_function_pointers(); @@ -4026,4 +4112,5 @@ START_TEST(d3d) test_wndproc(); test_window_style(); test_redundant_mode_set(); + test_coop_level_mode_set(); }
1
0
0
0
Alexandre Julliard : makefiles: Create test resource files directly from the test build directory.
by Alexandre Julliard
24 May '11
24 May '11
Module: wine Branch: master Commit: 9b99cd1d317b72184a74d4eb964160ebe66f062b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b99cd1d317b72184a74d4eb9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue May 24 11:11:22 2011 +0200 makefiles: Create test resource files directly from the test build directory. --- .gitignore | 3 +- Make.vars.in | 1 - Maketest.rules.in | 10 +++- aclocal.m4 | 12 ++--- configure | 108 ++--------------------------------------- configure.ac | 2 - programs/winetest/Makefile.in | 5 +- tools/make_makefiles | 3 +- 8 files changed, 22 insertions(+), 122 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9b99cd1d317b72184a74d…
1
0
0
0
Alexandre Julliard : server: Grab the current pointer to avoid referencing it after it could become invalid .
by Alexandre Julliard
23 May '11
23 May '11
Module: wine Branch: master Commit: be23f5a7a6f8a657cc4ee2927e1b138118a858e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be23f5a7a6f8a657cc4ee2927…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon May 23 19:51:00 2011 +0200 server: Grab the current pointer to avoid referencing it after it could become invalid. --- server/debugger.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/debugger.c b/server/debugger.c index d8a390e..35cb3e3 100644 --- a/server/debugger.c +++ b/server/debugger.c @@ -632,6 +632,7 @@ DECL_HANDLER(queue_exception_event) { debug_event_t data; struct debug_event *event; + struct thread *thread = current; if ((req->len % sizeof(client_ptr_t)) != 0 || req->len > get_req_data_size() || @@ -649,19 +650,19 @@ DECL_HANDLER(queue_exception_event) data.exception.nb_params = req->len / sizeof(client_ptr_t); memcpy( data.exception.params, get_req_data(), req->len ); - if ((event = alloc_debug_event( current, EXCEPTION_DEBUG_EVENT, &data ))) + if ((event = alloc_debug_event( thread, EXCEPTION_DEBUG_EVENT, &data ))) { const context_t *context = (const context_t *)((const char *)get_req_data() + req->len); data_size_t size = get_req_data_size() - req->len; memset( &event->context, 0, sizeof(event->context) ); memcpy( &event->context, context, min( sizeof(event->context), size ) ); - current->context = &event->context; + thread->context = &event->context; - if ((reply->handle = alloc_handle( current->process, event, SYNCHRONIZE, 0 ))) + if ((reply->handle = alloc_handle( thread->process, event, SYNCHRONIZE, 0 ))) { link_event( event ); - suspend_process( current->process ); + suspend_process( thread->process ); } release_object( event ); }
1
0
0
0
Francois Gouget : hostname: Make display_computer_name() static.
by Alexandre Julliard
23 May '11
23 May '11
Module: wine Branch: master Commit: 6a651fa7f4fd200c1b43547d6a122a10281272f9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6a651fa7f4fd200c1b43547d6…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon May 23 16:20:36 2011 +0200 hostname: Make display_computer_name() static. --- programs/hostname/hostname.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/hostname/hostname.c b/programs/hostname/hostname.c index 75095df..003bbba 100644 --- a/programs/hostname/hostname.c +++ b/programs/hostname/hostname.c @@ -107,7 +107,7 @@ static int hostname_message(int msg) return hostname_printfW(formatW, msg_buffer); } -void display_computer_name(void) +static void display_computer_name(void) { static const WCHAR fmtW[] = {'%','s','\n',0};
1
0
0
0
Francois Gouget : msvcrt: Add a trailing '\n' to an ERR() call.
by Alexandre Julliard
23 May '11
23 May '11
Module: wine Branch: master Commit: 37daab560ce4cd1a7555ea61c74e5e1ea94e3895 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=37daab560ce4cd1a7555ea61c…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon May 23 16:20:30 2011 +0200 msvcrt: Add a trailing '\n' to an ERR() call. --- dlls/msvcrt/file.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 90f8a45..61e31d1 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -198,7 +198,7 @@ static inline MSVCRT_FILE* msvcrt_get_file(int i) if(!ret) { MSVCRT_fstream[i/MSVCRT_FD_BLOCK_SIZE] = MSVCRT_calloc(MSVCRT_FD_BLOCK_SIZE, sizeof(file_crit)); if(!MSVCRT_fstream[i/MSVCRT_FD_BLOCK_SIZE]) { - ERR("out of memory"); + ERR("out of memory\n"); *MSVCRT__errno() = MSVCRT_ENOMEM; return NULL; }
1
0
0
0
Jacek Caban : wininet: Added connection closing tests.
by Alexandre Julliard
23 May '11
23 May '11
Module: wine Branch: master Commit: 6eff315555df27704bcfa76cd528074330b2c9c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6eff315555df27704bcfa76cd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 23 16:10:22 2011 +0200 wininet: Added connection closing tests. --- dlls/wininet/tests/http.c | 88 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 87 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index b1b310c..5db7f64 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -102,7 +102,7 @@ static int expect[MAX_INTERNET_STATUS], optional[MAX_INTERNET_STATUS], wine_allow[MAX_INTERNET_STATUS], notified[MAX_INTERNET_STATUS]; static const char *status_string[MAX_INTERNET_STATUS]; -static HANDLE hCompleteEvent; +static HANDLE hCompleteEvent, conn_close_event; #define TESTF_REDIRECT 0x01 #define TESTF_COMPRESSED 0x02 @@ -1765,6 +1765,13 @@ static DWORD CALLBACK server_thread(LPVOID param) static const char nocontentmsg[] = "HTTP/1.1 204 No Content\r\nConnection: close\r\n\r\n"; send(c, nocontentmsg, sizeof(nocontentmsg)-1, 0); } + if (strstr(buffer, "GET /test_conn_close")) + { + static const char conn_close_response[] = "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\nsome content"; + send(c, conn_close_response, sizeof(conn_close_response)-1, 0); + WaitForSingleObject(conn_close_event, INFINITE); + trace("closing connection\n"); + } shutdown(c, 2); closesocket(c); @@ -2174,6 +2181,84 @@ static void test_no_content(int port) CloseHandle(hCompleteEvent); } +static void test_conn_close(int port) +{ + HINTERNET session, connection, req; + DWORD res, avail, size; + BYTE buf[1024]; + + trace("Testing connection close connection...\n"); + + hCompleteEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + conn_close_event = CreateEvent(NULL, FALSE, FALSE, NULL); + + session = InternetOpenA("", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, INTERNET_FLAG_ASYNC); + ok(session != NULL,"InternetOpen failed with error %u\n", GetLastError()); + + pInternetSetStatusCallbackA(session, callback); + + SET_EXPECT(INTERNET_STATUS_HANDLE_CREATED); + connection = InternetConnectA(session, "localhost", port, + NULL, NULL, INTERNET_SERVICE_HTTP, 0x0, 0xdeadbeef); + ok(connection != NULL,"InternetConnect failed with error %u\n", GetLastError()); + CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED); + + SET_EXPECT(INTERNET_STATUS_HANDLE_CREATED); + req = HttpOpenRequestA(connection, "GET", "/test_conn_close", NULL, NULL, NULL, + INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RESYNCHRONIZE, 0xdeadbead); + ok(req != NULL, "HttpOpenRequest failed: %u\n", GetLastError()); + CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED); + + SET_OPTIONAL(INTERNET_STATUS_COOKIE_SENT); + SET_EXPECT(INTERNET_STATUS_CONNECTING_TO_SERVER); + SET_EXPECT(INTERNET_STATUS_CONNECTED_TO_SERVER); + SET_EXPECT(INTERNET_STATUS_SENDING_REQUEST); + SET_EXPECT(INTERNET_STATUS_REQUEST_SENT); + SET_EXPECT(INTERNET_STATUS_RECEIVING_RESPONSE); + SET_EXPECT(INTERNET_STATUS_RESPONSE_RECEIVED); + SET_EXPECT(INTERNET_STATUS_REQUEST_COMPLETE); + + res = HttpSendRequestA(req, NULL, -1, NULL, 0); + ok(!res && (GetLastError() == ERROR_IO_PENDING), + "Asynchronous HttpSendRequest NOT returning 0 with error ERROR_IO_PENDING\n"); + WaitForSingleObject(hCompleteEvent, INFINITE); + + CLEAR_NOTIFIED(INTERNET_STATUS_COOKIE_SENT); + CHECK_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER); + CHECK_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER); + CHECK_NOTIFIED(INTERNET_STATUS_SENDING_REQUEST); + CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_SENT); + CHECK_NOTIFIED(INTERNET_STATUS_RECEIVING_RESPONSE); + CHECK_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED); + CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE); + + avail = 0; + res = InternetQueryDataAvailable(req, &avail, 0, 0); + ok(res, "InternetQueryDataAvailable failed: %u\n", GetLastError()); + ok(avail != 0, "avail = 0\n"); + + size = 0; + res = InternetReadFile(req, buf, avail, &size); + ok(res, "InternetReadFile failed: %u\n", GetLastError()); + + res = InternetQueryDataAvailable(req, &avail, 0, 0); + ok(!res && (GetLastError() == ERROR_IO_PENDING), + "Asynchronous HttpSendRequest NOT returning 0 with error ERROR_IO_PENDING\n"); + ok(!avail, "avail = %u, expected 0\n", avail); + + SET_EXPECT(INTERNET_STATUS_CLOSING_CONNECTION); + SET_EXPECT(INTERNET_STATUS_CONNECTION_CLOSED); + SET_EXPECT(INTERNET_STATUS_REQUEST_COMPLETE); + SetEvent(conn_close_event); + WaitForSingleObject(hCompleteEvent, INFINITE); + CHECK_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION); + CHECK_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED); + CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE); + + close_async_handle(session, hCompleteEvent, 2); + CloseHandle(hCompleteEvent); +} + static void test_HttpSendRequestW(int port) { static const WCHAR header[] = {'U','A','-','C','P','U',':',' ','x','8','6',0}; @@ -2708,6 +2793,7 @@ static void test_http_connection(void) test_options(si.port); test_url_caching(si.port, &si.num_testH_retrievals); test_no_content(si.port); + test_conn_close(si.port); /* send the basic request again to shutdown the server thread */ test_basic_request(si.port, "GET", "/quit");
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
95
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
Results per page:
10
25
50
100
200