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
December 2006
----- 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
4 participants
720 discussions
Start a n
N
ew thread
Pierre d'Herbemont : user32: Factorize graphics driver SetParent into user32.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: 221b044740e97c1af710b4222fdeafb8e8d6bf9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=221b044740e97c1af710b4222…
Author: Pierre d'Herbemont <pdherbemont(a)free.fr> Date: Sun Dec 10 23:21:28 2006 +0100 user32: Factorize graphics driver SetParent into user32. --- dlls/user32/driver.c | 7 ++-- dlls/user32/user_private.h | 2 +- dlls/user32/win.c | 39 +++++++++++++++++++- dlls/winex11.drv/window.c | 73 +++++++++---------------------------- dlls/winex11.drv/winex11.drv.spec | 2 +- 5 files changed, 60 insertions(+), 63 deletions(-) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index b5bf7a8..0c93a67 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -365,9 +365,8 @@ static void nulldrv_SetFocus( HWND hwnd { } -static HWND nulldrv_SetParent( HWND hwnd, HWND parent ) +static void nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent ) { - return 0; } static BOOL nulldrv_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, @@ -684,9 +683,9 @@ static void loaderdrv_SetFocus( HWND hwn load_driver()->pSetFocus( hwnd ); } -static HWND loaderdrv_SetParent( HWND hwnd, HWND parent ) +static void loaderdrv_SetParent( HWND hwnd, HWND parent, HWND old_parent ) { - return load_driver()->pSetParent( hwnd, parent ); + load_driver()->pSetParent( hwnd, parent, old_parent ); } static BOOL loaderdrv_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 5fad289..ae27884 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -148,7 +148,7 @@ typedef struct tagUSER_DRIVER { INT (*pReleaseDC)(HWND,HDC,BOOL); BOOL (*pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT); void (*pSetFocus)(HWND); - HWND (*pSetParent)(HWND,HWND); + void (*pSetParent)(HWND,HWND,HWND); BOOL (*pSetWindowPos)(HWND,HWND,const RECT *,const RECT *,UINT,const RECT *); int (*pSetWindowRgn)(HWND,HRGN,BOOL); void (*pSetWindowIcon)(HWND,UINT,HICON); diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 9ee1c00..42b7696 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2531,6 +2531,10 @@ HWND WINAPI GetAncestor( HWND hwnd, UINT HWND WINAPI SetParent( HWND hwnd, HWND parent ) { HWND full_handle; + HWND old_parent = 0; + BOOL was_visible; + WND *wndPtr; + BOOL ret; if (is_broadcast(hwnd) || is_broadcast(parent)) { @@ -2557,7 +2561,40 @@ HWND WINAPI SetParent( HWND hwnd, HWND p if (!(full_handle = WIN_IsCurrentThread( hwnd ))) return (HWND)SendMessageW( hwnd, WM_WINE_SETPARENT, (WPARAM)parent, 0 ); - return USER_Driver->pSetParent( full_handle, parent ); + /* Windows hides the window first, then shows it again + * including the WM_SHOWWINDOW messages and all */ + was_visible = ShowWindow( hwnd, SW_HIDE ); + + wndPtr = WIN_GetPtr( hwnd ); + if (!wndPtr || wndPtr == WND_OTHER_PROCESS || wndPtr == WND_DESKTOP) return 0; + + SERVER_START_REQ( set_parent ) + { + req->handle = hwnd; + req->parent = parent; + if ((ret = !wine_server_call( req ))) + { + old_parent = reply->old_parent; + wndPtr->parent = parent = reply->full_parent; + } + + } + SERVER_END_REQ; + WIN_ReleasePtr( wndPtr ); + if (!ret) return 0; + + USER_Driver->pSetParent( full_handle, parent, old_parent ); + + /* SetParent additionally needs to make hwnd the topmost window + in the x-order and send the expected WM_WINDOWPOSCHANGING and + WM_WINDOWPOSCHANGED notification messages. + */ + SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, + SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | (was_visible ? SWP_SHOWWINDOW : 0) ); + /* FIXME: a WM_MOVE is also generated (in the DefWindowProc handler + * for WM_WINDOWPOSCHANGED) in Windows, should probably remove SWP_NOMOVE */ + + return old_parent; } diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 58b0c9c..26bd8e1 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1230,72 +1230,33 @@ XIC X11DRV_get_ic( HWND hwnd ) /***************************************************************** * SetParent (X11DRV.@) */ -HWND X11DRV_SetParent( HWND hwnd, HWND parent ) +void X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent ) { Display *display = thread_display(); - WND *wndPtr; - BOOL ret; - HWND old_parent = 0; - - /* Windows hides the window first, then shows it again - * including the WM_SHOWWINDOW messages and all */ - BOOL was_visible = ShowWindow( hwnd, SW_HIDE ); - - wndPtr = WIN_GetPtr( hwnd ); - if (!wndPtr || wndPtr == WND_OTHER_PROCESS || wndPtr == WND_DESKTOP) return 0; - - SERVER_START_REQ( set_parent ) - { - req->handle = hwnd; - req->parent = parent; - if ((ret = !wine_server_call( req ))) - { - old_parent = reply->old_parent; - wndPtr->parent = parent = reply->full_parent; - } + struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); - } - SERVER_END_REQ; - WIN_ReleasePtr( wndPtr ); - if (!ret) return 0; + if (!data) return; + if (parent == old_parent) return; - if (parent != old_parent) + if (parent != GetDesktopWindow()) /* a child window */ { - struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); - - if (!data) return 0; - - if (parent != GetDesktopWindow()) /* a child window */ + if (old_parent == GetDesktopWindow()) { - if (old_parent == GetDesktopWindow()) + /* destroy the old X windows */ + destroy_whole_window( display, data ); + destroy_icon_window( display, data ); + if (data->managed) { - /* destroy the old X windows */ - destroy_whole_window( display, data ); - destroy_icon_window( display, data ); - if (data->managed) - { - data->managed = FALSE; - RemovePropA( data->hwnd, managed_prop ); - } + data->managed = FALSE; + RemovePropA( data->hwnd, managed_prop ); } } - else /* new top level window */ - { - /* FIXME: we ignore errors since we can't really recover anyway */ - create_whole_window( display, data, GetWindowLongW( hwnd, GWL_STYLE ) ); - } } - - /* SetParent additionally needs to make hwnd the topmost window - in the x-order and send the expected WM_WINDOWPOSCHANGING and - WM_WINDOWPOSCHANGED notification messages. - */ - SetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, - SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | (was_visible ? SWP_SHOWWINDOW : 0) ); - /* FIXME: a WM_MOVE is also generated (in the DefWindowProc handler - * for WM_WINDOWPOSCHANGED) in Windows, should probably remove SWP_NOMOVE */ - - return old_parent; + else /* new top level window */ + { + /* FIXME: we ignore errors since we can't really recover anyway */ + create_whole_window( display, data, GetWindowLongW( hwnd, GWL_STYLE ) ); + } } diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 1387979..95b3d94 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -103,7 +103,7 @@ @ cdecl ScrollDC(long long long ptr ptr long ptr) X11DRV_ScrollDC @ cdecl SetClipboardData(long long long long) X11DRV_SetClipboardData @ cdecl SetFocus(long) X11DRV_SetFocus -@ cdecl SetParent(long long) X11DRV_SetParent +@ cdecl SetParent(long long long) X11DRV_SetParent @ cdecl SetWindowIcon(long long long) X11DRV_SetWindowIcon @ cdecl SetWindowPos(long long ptr ptr long ptr) X11DRV_SetWindowPos @ cdecl SetWindowRgn(long long long) X11DRV_SetWindowRgn
1
0
0
0
Clinton Stimpson : usp10: Add tests and fix for ScriptXtoCP .
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: 39a5b0760c49c5d03bab99320f70927782fd0192 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39a5b0760c49c5d03bab99320…
Author: Clinton Stimpson <cjstimpson(a)utwire.net> Date: Mon Dec 11 22:23:53 2006 -0700 usp10: Add tests and fix for ScriptXtoCP . --- dlls/usp10/tests/usp10.c | 19 +++++++++++++++++++ dlls/usp10/usp10.c | 7 ++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 45988d6..c6ffd8a 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -574,6 +574,25 @@ static void test_ScriptXtoX(void) ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); ok(piCP == 4, "iX=%d should return piCP=4 not %d\n", iX, piCP); + iX = 0; + cChars = 10; + cGlyphs = 10; + hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing); + ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); + ok(piCP == 0, "iX=%d should return piCP=0 not %d\n", iX, piCP); + iX = 195; + cChars = 10; + cGlyphs = 10; + hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing); + ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); + ok(piCP == 0, "iX=%d should return piCP=0 not %d\n", iX, piCP); + iX = 196; + cChars = 10; + cGlyphs = 10; + hr = ScriptXtoCP(iX, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piCP, &piTrailing); + ok(hr == S_OK, "ScriptXtoCP should return S_OK not %08x\n", hr); + ok(piCP == 1, "iX=%d should return piCP=1 not %d\n", iX, piCP); + iCP=5; fTrailing = FALSE; cChars = 10; diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 9fd6c1e..5f88138 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -561,7 +561,7 @@ HRESULT WINAPI ScriptXtoCP(int iX, int *piTrailing) { int item; - int iPosX = 1; + int iPosX; float fMaxPosX = 1; float fAvePosX; TRACE("(%d,%d,%d,%p,%p,%p,%p,%p,%p)\n", @@ -585,8 +585,9 @@ HRESULT WINAPI ScriptXtoCP(int iX, } fAvePosX = fMaxPosX / cGlyphs; - for (item = 0; item < cGlyphs && iPosX < iX; item++) - iPosX = fAvePosX * (item +1); + iPosX = fAvePosX; + for (item = 1; item < cGlyphs && iPosX < iX; item++) + iPosX += fAvePosX; if (iPosX - iX > fAvePosX/2) *piTrailing = 0; else
1
0
0
0
Vitaliy Margolen : dinput: Use standard mouse data format instead of custom one.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: aa8392c9e7410e3bc693adb482ecd27b268d2fc0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa8392c9e7410e3bc693adb48…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Dec 12 08:58:51 2006 -0700 dinput: Use standard mouse data format instead of custom one. --- dlls/dinput/mouse.c | 39 +++------------------------------------ 1 files changed, 3 insertions(+), 36 deletions(-) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 2707121..236df70 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -62,39 +62,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); #define WINE_MOUSE_R_POSITION 4 #define WINE_MOUSE_M_POSITION 5 -typedef struct { - LONG lX; - LONG lY; - LONG lZ; - BYTE rgbButtons[4]; -} Wine_InternalMouseData; - -#define WINE_INTERNALMOUSE_NUM_OBJS 6 - -static const DIOBJECTDATAFORMAT Wine_InternalMouseObjectFormat[WINE_INTERNALMOUSE_NUM_OBJS] = { - { &GUID_XAxis, FIELD_OFFSET(Wine_InternalMouseData, lX), - DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS, 0 }, - { &GUID_YAxis, FIELD_OFFSET(Wine_InternalMouseData, lY), - DIDFT_MAKEINSTANCE(WINE_MOUSE_Y_AXIS_INSTANCE) | DIDFT_RELAXIS, 0 }, - { &GUID_ZAxis, FIELD_OFFSET(Wine_InternalMouseData, lZ), - DIDFT_MAKEINSTANCE(WINE_MOUSE_Z_AXIS_INSTANCE) | DIDFT_RELAXIS, 0 }, - { &GUID_Button, (FIELD_OFFSET(Wine_InternalMouseData, rgbButtons)) + 0, - DIDFT_MAKEINSTANCE(WINE_MOUSE_L_BUTTON_INSTANCE) | DIDFT_PSHBUTTON, 0 }, - { &GUID_Button, (FIELD_OFFSET(Wine_InternalMouseData, rgbButtons)) + 1, - DIDFT_MAKEINSTANCE(WINE_MOUSE_R_BUTTON_INSTANCE) | DIDFT_PSHBUTTON, 0 }, - { &GUID_Button, (FIELD_OFFSET(Wine_InternalMouseData, rgbButtons)) + 2, - DIDFT_MAKEINSTANCE(WINE_MOUSE_M_BUTTON_INSTANCE) | DIDFT_PSHBUTTON, 0 } -}; - -static const DIDATAFORMAT Wine_InternalMouseFormat = { - sizeof(DIDATAFORMAT), - sizeof(DIOBJECTDATAFORMAT), - DIDF_RELAXIS, - sizeof(Wine_InternalMouseData), - WINE_INTERNALMOUSE_NUM_OBJS, /* dwNumObjs */ - (LPDIOBJECTDATAFORMAT) Wine_InternalMouseObjectFormat -}; - static const IDirectInputDevice8AVtbl SysMouseAvt; static const IDirectInputDevice8WVtbl SysMouseWvt; @@ -126,7 +93,7 @@ struct SysMouseImpl DWORD last_warped; /* This is for mouse reporting. */ - Wine_InternalMouseData m_state; + DIMOUSESTATE2 m_state; }; /* FIXME: This is ugly and not thread safe :/ */ @@ -236,8 +203,8 @@ static SysMouseImpl *alloc_device(REFGUI InitializeCriticalSection(&newDevice->base.crit); newDevice->dinput = dinput; - newDevice->base.data_format.wine_df = &Wine_InternalMouseFormat; - if (create_DataFormat(&Wine_InternalMouseFormat, &newDevice->base.data_format) == DI_OK) + newDevice->base.data_format.wine_df = &c_dfDIMouse2; + if (create_DataFormat(&c_dfDIMouse2, &newDevice->base.data_format) == DI_OK) return newDevice; return NULL;
1
0
0
0
Vitaliy Margolen : dinput: Remove redundant parameter.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: 6246fa62f99e9c4b8ad5f333fbe898c42d8914fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6246fa62f99e9c4b8ad5f333f…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Dec 12 08:58:40 2006 -0700 dinput: Remove redundant parameter. --- dlls/dinput/device.c | 38 +++++++++++++++++++----------------- dlls/dinput/device_private.h | 2 +- dlls/dinput/joystick_linux.c | 2 +- dlls/dinput/joystick_linuxinput.c | 2 +- dlls/dinput/keyboard.c | 2 +- dlls/dinput/mouse.c | 2 +- 6 files changed, 25 insertions(+), 23 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 269fc06..7586530 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -336,7 +336,7 @@ static void calculate_ids(LPDIDATAFORMAT } } -HRESULT create_DataFormat(LPCDIDATAFORMAT wine_format, LPCDIDATAFORMAT asked_format, DataFormat *format) +HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format) { DataTransform *dt; unsigned int i, j; @@ -344,12 +344,13 @@ HRESULT create_DataFormat(LPCDIDATAFORMA int *done; int index = 0; DWORD next = 0; - + + if (!format->wine_df) return DIERR_INVALIDPARAM; done = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, asked_format->dwNumObjs * sizeof(int)); dt = HeapAlloc(GetProcessHeap(), 0, asked_format->dwNumObjs * sizeof(DataTransform)); if (!dt || !done) goto failed; - if (!(format->offsets = HeapAlloc(GetProcessHeap(), 0, wine_format->dwNumObjs * sizeof(int)))) + if (!(format->offsets = HeapAlloc(GetProcessHeap(), 0, format->wine_df->dwNumObjs * sizeof(int)))) goto failed; if (!(format->user_df = HeapAlloc(GetProcessHeap(), 0, asked_format->dwSize))) @@ -362,7 +363,8 @@ HRESULT create_DataFormat(LPCDIDATAFORMA TRACE("Creating DataTransform :\n"); - for (i = 0; i < wine_format->dwNumObjs; i++) { + for (i = 0; i < format->wine_df->dwNumObjs; i++) + { format->offsets[i] = -1; for (j = 0; j < asked_format->dwNumObjs; j++) { @@ -373,18 +375,18 @@ HRESULT create_DataFormat(LPCDIDATAFORMA * the GUID of the Wine object. */ ((asked_format->rgodf[j].pguid == NULL) || - (wine_format->rgodf[i].pguid == NULL) || - (IsEqualGUID(wine_format->rgodf[i].pguid, asked_format->rgodf[j].pguid))) + (format->wine_df->rgodf[i].pguid == NULL) || + (IsEqualGUID(format->wine_df->rgodf[i].pguid, asked_format->rgodf[j].pguid))) && (/* Then check if it accepts any instance id, and if not, if it matches Wine's * instance id. */ (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == 0xFFFF) || (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == 0x00FF) || /* This is mentionned in no DX docs, but it works fine - tested on WinXP */ - (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == DIDFT_GETINSTANCE(wine_format->rgodf[i].dwType))) + (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == DIDFT_GETINSTANCE(format->wine_df->rgodf[i].dwType))) && ( /* Then if the asked type matches the one Wine provides */ - DIDFT_GETTYPE(asked_format->rgodf[j].dwType) & wine_format->rgodf[i].dwType)) + DIDFT_GETTYPE(asked_format->rgodf[j].dwType) & format->wine_df->rgodf[i].dwType)) { done[j] = 1; @@ -399,23 +401,23 @@ HRESULT create_DataFormat(LPCDIDATAFORMA TRACE(" - Wine (%d) :\n", i); TRACE(" * GUID: %s ('%s')\n", - debugstr_guid(wine_format->rgodf[i].pguid), - _dump_dinput_GUID(wine_format->rgodf[i].pguid)); - TRACE(" * Offset: %3d\n", wine_format->rgodf[i].dwOfs); - TRACE(" * dwType: %08x\n", wine_format->rgodf[i].dwType); - TRACE(" "); _dump_EnumObjects_flags(wine_format->rgodf[i].dwType); TRACE("\n"); + debugstr_guid(format->wine_df->rgodf[i].pguid), + _dump_dinput_GUID(format->wine_df->rgodf[i].pguid)); + TRACE(" * Offset: %3d\n", format->wine_df->rgodf[i].dwOfs); + TRACE(" * dwType: %08x\n", format->wine_df->rgodf[i].dwType); + TRACE(" "); _dump_EnumObjects_flags(format->wine_df->rgodf[i].dwType); TRACE("\n"); - if (wine_format->rgodf[i].dwType & DIDFT_BUTTON) + if (format->wine_df->rgodf[i].dwType & DIDFT_BUTTON) dt[index].size = sizeof(BYTE); else dt[index].size = sizeof(DWORD); - dt[index].offset_in = wine_format->rgodf[i].dwOfs; + dt[index].offset_in = format->wine_df->rgodf[i].dwOfs; dt[index].offset_out = asked_format->rgodf[j].dwOfs; format->offsets[i] = asked_format->rgodf[j].dwOfs; dt[index].value = 0; next = next + dt[index].size; - if (wine_format->rgodf[i].dwOfs != dt[index].offset_out) + if (format->wine_df->rgodf[i].dwOfs != dt[index].offset_out) same = 0; index++; @@ -451,7 +453,7 @@ HRESULT create_DataFormat(LPCDIDATAFORMA } } - format->internal_format_size = wine_format->dwDataSize; + format->internal_format_size = format->wine_df->dwDataSize; format->size = index; if (same) { HeapFree(GetProcessHeap(), 0, dt); @@ -635,7 +637,7 @@ HRESULT WINAPI IDirectInputDevice2AImpl_ EnterCriticalSection(&This->crit); release_DataFormat(&This->data_format); - res = create_DataFormat(This->data_format.wine_df, df, &This->data_format); + res = create_DataFormat(df, &This->data_format); LeaveCriticalSection(&This->crit); return res; diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index eb6aa8e..e35c9f4 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -69,7 +69,7 @@ struct IDirectInputDevice2AImpl /* Routines to do DataFormat / WineFormat conversions */ extern void fill_DataFormat(void *out, const void *in, DataFormat *df) ; -extern HRESULT create_DataFormat(LPCDIDATAFORMAT wine_format, LPCDIDATAFORMAT asked_format, DataFormat *format); +extern HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format); extern void release_DataFormat(DataFormat *df) ; extern void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, DWORD seq); /* Helper functions to work with data format */ diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index 7f80f72..745fd5c 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -481,7 +481,7 @@ static HRESULT alloc_device(REFGUID rgui newDevice->base.data_format.wine_df = &c_dfDIJoystick2; /* create the default transform filter */ - hr = create_DataFormat(&c_dfDIJoystick2, &c_dfDIJoystick2, &newDevice->base.data_format); + hr = create_DataFormat(&c_dfDIJoystick2, &newDevice->base.data_format); if (hr != DI_OK) goto FAILED; IDirectInputDevice_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->dinput); diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index c1ce5ab..82b8d07 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -392,7 +392,7 @@ static JoystickImpl *alloc_device(REFGUI newDevice->base.data_format.wine_df = &c_dfDIJoystick2; /* create the default transform filter */ - if (create_DataFormat(&c_dfDIJoystick2, &c_dfDIJoystick2, &newDevice->base.data_format) == DI_OK) + if (create_DataFormat(&c_dfDIJoystick2, &newDevice->base.data_format) == DI_OK) return newDevice; HeapFree(GetProcessHeap(),0,newDevice); diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index dd19f35..cbf06ab 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -197,7 +197,7 @@ static SysKeyboardImpl *alloc_device(REF InitializeCriticalSection(&newDevice->base.crit); newDevice->base.data_format.wine_df = &c_dfDIKeyboard; - if (create_DataFormat(&c_dfDIKeyboard, &c_dfDIKeyboard, &newDevice->base.data_format) == DI_OK) + if (create_DataFormat(&c_dfDIKeyboard, &newDevice->base.data_format) == DI_OK) return newDevice; return NULL; } diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 2a2c394..2707121 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -237,7 +237,7 @@ static SysMouseImpl *alloc_device(REFGUI newDevice->dinput = dinput; newDevice->base.data_format.wine_df = &Wine_InternalMouseFormat; - if (create_DataFormat(&Wine_InternalMouseFormat, &Wine_InternalMouseFormat, &newDevice->base.data_format) == DI_OK) + if (create_DataFormat(&Wine_InternalMouseFormat, &newDevice->base.data_format) == DI_OK) return newDevice; return NULL;
1
0
0
0
Vitaliy Margolen : dinput: Move mouse & keyboard user data format to base class.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: d5b57f39040006e24740ad1d9ea4622ad544018b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d5b57f39040006e24740ad1d9…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Dec 12 08:58:29 2006 -0700 dinput: Move mouse & keyboard user data format to base class. --- dlls/dinput/keyboard.c | 5 +++- dlls/dinput/mouse.c | 67 +++++------------------------------------------- 2 files changed, 11 insertions(+), 61 deletions(-) diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index f75d76a..dd19f35 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -196,7 +196,10 @@ static SysKeyboardImpl *alloc_device(REF newDevice->dinput = dinput; InitializeCriticalSection(&newDevice->base.crit); - return newDevice; + newDevice->base.data_format.wine_df = &c_dfDIKeyboard; + if (create_DataFormat(&c_dfDIKeyboard, &c_dfDIKeyboard, &newDevice->base.data_format) == DI_OK) + return newDevice; + return NULL; } diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 809bf08..2a2c394 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -112,10 +112,6 @@ struct SysMouseImpl IDirectInputImpl *dinput; - /* The current data format and the conversion between internal - and external data formats */ - DIDATAFORMAT *df; - /* SysMouseAImpl */ BYTE absolute; /* Previous position for relative moves */ @@ -240,23 +236,10 @@ static SysMouseImpl *alloc_device(REFGUI InitializeCriticalSection(&newDevice->base.crit); newDevice->dinput = dinput; - newDevice->df = HeapAlloc(GetProcessHeap(), 0, Wine_InternalMouseFormat.dwSize); - if (!newDevice->df) goto FAILED; - memcpy(newDevice->df, &Wine_InternalMouseFormat, Wine_InternalMouseFormat.dwSize); - - /* copy default objects */ - newDevice->df->rgodf = HeapAlloc(GetProcessHeap(), 0, Wine_InternalMouseFormat.dwNumObjs*Wine_InternalMouseFormat.dwObjSize); - if (!newDevice->df->rgodf) goto FAILED; - memcpy(newDevice->df->rgodf, Wine_InternalMouseFormat.rgodf, Wine_InternalMouseFormat.dwNumObjs*Wine_InternalMouseFormat.dwObjSize); - - if (create_DataFormat(&Wine_InternalMouseFormat, newDevice->df, &newDevice->base.data_format) == DI_OK) + newDevice->base.data_format.wine_df = &Wine_InternalMouseFormat; + if (create_DataFormat(&Wine_InternalMouseFormat, &Wine_InternalMouseFormat, &newDevice->base.data_format) == DI_OK) return newDevice; -FAILED: - if (newDevice->df) - HeapFree(GetProcessHeap(), 0, newDevice->df->rgodf); - HeapFree(GetProcessHeap(), 0, newDevice->df); - HeapFree(GetProcessHeap(), 0, newDevice); return NULL; } @@ -328,50 +311,14 @@ static ULONG WINAPI SysMouseAImpl_Releas /* Free the data queue */ HeapFree(GetProcessHeap(), 0, This->base.data_queue); + + release_DataFormat(&This->base.data_format); + DeleteCriticalSection(&This->base.crit); - - /* Free the DataFormat */ - if (This->df != &(Wine_InternalMouseFormat)) { - HeapFree(GetProcessHeap(), 0, This->df->rgodf); - HeapFree(GetProcessHeap(), 0, This->df); - } - HeapFree(GetProcessHeap(),0,This); return 0; } -/****************************************************************************** - * SetDataFormat : the application can choose the format of the data - * the device driver sends back with GetDeviceState. - * - * For the moment, only the "standard" configuration (c_dfDIMouse) is supported - * in absolute and relative mode. - */ -static HRESULT WINAPI SysMouseAImpl_SetDataFormat( - LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df -) -{ - SysMouseImpl *This = (SysMouseImpl *)iface; - - TRACE("(this=%p,%p)\n",This,df); - - _dump_DIDATAFORMAT(df); - - /* Tests under windows show that a call to SetDataFormat always sets the mouse - in relative mode whatever the dwFlags value (DIDF_ABSAXIS/DIDF_RELAXIS). - To switch in absolute mode, SetProperty must be used. */ - This->absolute = 0; - - /* Store the new data format */ - This->df = HeapAlloc(GetProcessHeap(),0,df->dwSize); - memcpy(This->df, df, df->dwSize); - This->df->rgodf = HeapAlloc(GetProcessHeap(),0,df->dwNumObjs*df->dwObjSize); - memcpy(This->df->rgodf,df->rgodf,df->dwNumObjs*df->dwObjSize); - - /* Prepare all the data-conversion filters */ - return create_DataFormat(&Wine_InternalMouseFormat, This->df, &This->base.data_format); -} - /* low-level mouse hook */ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lparam ) { @@ -949,7 +896,7 @@ static const IDirectInputDevice8AVtbl Sy SysMouseAImpl_Unacquire, SysMouseAImpl_GetDeviceState, SysMouseAImpl_GetDeviceData, - SysMouseAImpl_SetDataFormat, + IDirectInputDevice2AImpl_SetDataFormat, IDirectInputDevice2AImpl_SetEventNotification, IDirectInputDevice2AImpl_SetCooperativeLevel, IDirectInputDevice2AImpl_GetObjectInfo, @@ -991,7 +938,7 @@ static const IDirectInputDevice8WVtbl Sy XCAST(Unacquire)SysMouseAImpl_Unacquire, XCAST(GetDeviceState)SysMouseAImpl_GetDeviceState, XCAST(GetDeviceData)SysMouseAImpl_GetDeviceData, - XCAST(SetDataFormat)SysMouseAImpl_SetDataFormat, + XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat, XCAST(SetEventNotification)IDirectInputDevice2AImpl_SetEventNotification, XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel, IDirectInputDevice2WImpl_GetObjectInfo,
1
0
0
0
Vitaliy Margolen : dinput: Move joystick user data format into base class.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: 1d314d54ba993154f0e521908768aae3db807625 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d314d54ba993154f0e521908…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Dec 12 08:58:13 2006 -0700 dinput: Move joystick user data format into base class. --- dlls/dinput/joystick_linux.c | 142 +++++++++++-------------------------- dlls/dinput/joystick_linuxinput.c | 108 +++++----------------------- 2 files changed, 61 insertions(+), 189 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1d314d54ba993154f0e52…
1
0
0
0
Vitaliy Margolen : dinput: Add user data format into base class. Implement SetDataFormat.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: 3446caab56efa1ca6c038dcac7a80c026229f7b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3446caab56efa1ca6c038dcac…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Dec 12 08:58:02 2006 -0700 dinput: Add user data format into base class. Implement SetDataFormat. --- dlls/dinput/device.c | 46 +++++++++++++++++++++++++++++++++-------- dlls/dinput/device_private.h | 6 +++- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index b6f675d..269fc06 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -288,6 +288,10 @@ void release_DataFormat(DataFormat * for format->dt = NULL; HeapFree(GetProcessHeap(), 0, format->offsets); format->offsets = NULL; + if (format->user_df) + HeapFree(GetProcessHeap(), 0, format->user_df->rgodf); + HeapFree(GetProcessHeap(), 0, format->user_df); + format->user_df = NULL; } /* Make all instances sequential */ @@ -332,7 +336,7 @@ static void calculate_ids(LPDIDATAFORMAT } } -HRESULT create_DataFormat(LPCDIDATAFORMAT wine_format, LPDIDATAFORMAT asked_format, DataFormat *format) +HRESULT create_DataFormat(LPCDIDATAFORMAT wine_format, LPCDIDATAFORMAT asked_format, DataFormat *format) { DataTransform *dt; unsigned int i, j; @@ -348,6 +352,14 @@ HRESULT create_DataFormat(LPCDIDATAFORMA if (!(format->offsets = HeapAlloc(GetProcessHeap(), 0, wine_format->dwNumObjs * sizeof(int)))) goto failed; + if (!(format->user_df = HeapAlloc(GetProcessHeap(), 0, asked_format->dwSize))) + goto failed; + memcpy(format->user_df, asked_format, asked_format->dwSize); + + if (!(format->user_df->rgodf = HeapAlloc(GetProcessHeap(), 0, asked_format->dwNumObjs*asked_format->dwObjSize))) + goto failed; + memcpy(format->user_df->rgodf, asked_format->rgodf, asked_format->dwNumObjs*asked_format->dwObjSize); + TRACE("Creating DataTransform :\n"); for (i = 0; i < wine_format->dwNumObjs; i++) { @@ -450,7 +462,7 @@ HRESULT create_DataFormat(LPCDIDATAFORMA HeapFree(GetProcessHeap(), 0, done); /* Last step - reset all instances of the new format */ - calculate_ids(asked_format); + calculate_ids(format->user_df); return DI_OK; failed: @@ -459,6 +471,10 @@ failed: format->dt = NULL; HeapFree(GetProcessHeap(), 0, format->offsets); format->offsets = NULL; + if (format->user_df) + HeapFree(GetProcessHeap(), 0, format->user_df->rgodf); + HeapFree(GetProcessHeap(), 0, format->user_df); + format->user_df = NULL; return DIERR_OUTOFMEMORY; } @@ -570,6 +586,8 @@ HRESULT WINAPI IDirectInputDevice2AImpl_ IDirectInputDevice2AImpl *This = (IDirectInputDevice2AImpl *)iface; HRESULT res; + if (!This->data_format.user_df) return DIERR_INVALIDPARAM; + EnterCriticalSection(&This->crit); res = This->acquired ? S_FALSE : DI_OK; This->acquired = 1; @@ -602,15 +620,25 @@ HRESULT WINAPI IDirectInputDevice2AImpl_ */ HRESULT WINAPI IDirectInputDevice2AImpl_SetDataFormat( - LPDIRECTINPUTDEVICE8A iface,LPCDIDATAFORMAT df -) { + LPDIRECTINPUTDEVICE8A iface, LPCDIDATAFORMAT df) +{ IDirectInputDevice2AImpl *This = (IDirectInputDevice2AImpl *)iface; - - TRACE("(this=%p,%p)\n",This,df); - + HRESULT res = DI_OK; + + if (!df) return E_POINTER; + TRACE("(%p) %p\n", This, df); _dump_DIDATAFORMAT(df); - - return DI_OK; + + if (df->dwSize != sizeof(DIDATAFORMAT)) return DIERR_INVALIDPARAM; + if (This->acquired) return DIERR_ACQUIRED; + + EnterCriticalSection(&This->crit); + + release_DataFormat(&This->data_format); + res = create_DataFormat(This->data_format.wine_df, df, &This->data_format); + + LeaveCriticalSection(&This->crit); + return res; } /****************************************************************************** diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index fb5eac2..eb6aa8e 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -40,7 +40,9 @@ typedef struct int internal_format_size; DataTransform *dt; - int *offsets; /* object offsets */ + int *offsets; /* object offsets */ + LPCDIDATAFORMAT wine_df; /* wine internal data format */ + LPDIDATAFORMAT user_df; /* user defined data format */ } DataFormat; /* Device implementation */ @@ -67,7 +69,7 @@ struct IDirectInputDevice2AImpl /* Routines to do DataFormat / WineFormat conversions */ extern void fill_DataFormat(void *out, const void *in, DataFormat *df) ; -extern HRESULT create_DataFormat(LPCDIDATAFORMAT wine_format, LPDIDATAFORMAT asked_format, DataFormat *format); +extern HRESULT create_DataFormat(LPCDIDATAFORMAT wine_format, LPCDIDATAFORMAT asked_format, DataFormat *format); extern void release_DataFormat(DataFormat *df) ; extern void queue_event(LPDIRECTINPUTDEVICE8A iface, int ofs, DWORD data, DWORD time, DWORD seq); /* Helper functions to work with data format */
1
0
0
0
Vitaliy Margolen : dinput: Move transform and offsets structures into base device class.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: cd050bf25cfe79637a89eed1dfeec1c6b8135ef8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd050bf25cfe79637a89eed1d…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Dec 12 08:57:54 2006 -0700 dinput: Move transform and offsets structures into base device class. --- dlls/dinput/device.c | 48 ++++++++++++-------- dlls/dinput/device_private.h | 33 ++++++++----- dlls/dinput/joystick_linux.c | 34 +++++--------- dlls/dinput/joystick_linuxinput.c | 27 +++-------- dlls/dinput/mouse.c | 91 +++++++++++++++++++------------------ 5 files changed, 114 insertions(+), 119 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cd050bf25cfe79637a89e…
1
0
0
0
Paul Vriens : winetest: Show correct filenames on test.winehq.org.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: 21be6a6c80a91245239d976492b1a11f56bb6874 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21be6a6c80a91245239d97649…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Dec 12 17:18:43 2006 +0100 winetest: Show correct filenames on
test.winehq.org
. --- programs/winetest/main.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index c1fc50c..62dda0d 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -165,10 +165,7 @@ static void remove_dir (const char *dir) static const char* get_test_source_file(const char* test, const char* subtest) { static const char* special_dirs[][2] = { - { "gdi32", "gdi"}, { "kernel32", "kernel" }, - { "msacm32", "msacm" }, - { "user32", "user" }, { "winspool.drv", "winspool" }, - { "ws2_32", "winsock" }, { 0, 0 } + { 0, 0 } }; static char buffer[MAX_PATH]; int i;
1
0
0
0
Paul Vriens : winspool.drv/tests: No need to return anything as we are using a global variable now.
by Alexandre Julliard
12 Dec '06
12 Dec '06
Module: wine Branch: master Commit: b73f30f8eb5c2debabd0065ee924d021ae20bd6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b73f30f8eb5c2debabd0065ee…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Dec 12 17:18:57 2006 +0100 winspool.drv/tests: No need to return anything as we are using a global variable now. --- dlls/winspool.drv/tests/info.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c index dec988e..04b1968 100644 --- a/dlls/winspool.drv/tests/info.c +++ b/dlls/winspool.drv/tests/info.c @@ -70,7 +70,7 @@ static DWORD report_deactivated_spooler } -static LPSTR find_default_printer(VOID) +static void find_default_printer(VOID) { static char buffer[DEFAULT_PRINTER_SIZE]; DWORD needed; @@ -122,7 +122,6 @@ static LPSTR find_default_printer(VOID) } trace("default_printer: '%s'\n", default_printer); } - return default_printer; } @@ -1681,7 +1680,7 @@ START_TEST(info) pGetDefaultPrinterA = (void *) GetProcAddress(hwinspool, "GetDefaultPrinterA"); pSetDefaultPrinterA = (void *) GetProcAddress(hwinspool, "SetDefaultPrinterA"); - default_printer = find_default_printer(); + find_default_printer(); test_AddMonitor(); test_AddPort();
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
72
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
Results per page:
10
25
50
100
200