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
July 2008
----- 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
3 participants
1114 discussions
Start a n
N
ew thread
Vitaliy Margolen : dinput: Freed effect should remove itself from the parent's list of effects. Add tests.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: a478c4fe251daba7080f9e6dc934be5168eec1c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a478c4fe251daba7080f9e6dc…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sat Jul 5 22:24:57 2008 -0600 dinput: Freed effect should remove itself from the parent's list of effects. Add tests. --- dlls/dinput/effect_linuxinput.c | 13 ++++++---- dlls/dinput/joystick_linuxinput.c | 4 +- dlls/dinput/tests/joystick.c | 46 +++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 7 deletions(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index ab72d2c..1fef4cd 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -53,11 +53,9 @@ struct LinuxInputEffectImpl LONG ref; GUID guid; - /* Effect data */ - struct ff_effect effect; - - /* Parent device */ - int* fd; + struct ff_effect effect; /* Effect data */ + int* fd; /* Parent device */ + struct list *entry; /* Entry into the parent's list of effects */ }; @@ -766,6 +764,8 @@ static ULONG WINAPI LinuxInputEffectImpl_Release(LPDIRECTINPUTEFFECT iface) { LinuxInputEffectImpl_Stop(iface); LinuxInputEffectImpl_Unload(iface); + list_remove(This->entry); + HeapFree(GetProcessHeap(), 0, LIST_ENTRY(This->entry, effect_list_item, entry)); HeapFree(GetProcessHeap(), 0, This); } return ref; @@ -778,6 +778,7 @@ static ULONG WINAPI LinuxInputEffectImpl_Release(LPDIRECTINPUTEFFECT iface) HRESULT linuxinput_create_effect( int* fd, REFGUID rguid, + struct list *parent_list_entry, LPDIRECTINPUTEFFECT* peff) { LinuxInputEffectImpl* newEffect = HeapAlloc(GetProcessHeap(), @@ -835,6 +836,8 @@ HRESULT linuxinput_create_effect( /* mark as non-uploaded */ newEffect->effect.id = -1; + newEffect->entry = parent_list_entry; + *peff = (LPDIRECTINPUTEFFECT)newEffect; TRACE("Creating linux input system effect (%p) with guid %s\n", diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index d3185d3..0ef90a1 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -141,7 +141,7 @@ struct wine_input_absinfo { }; /* implemented in effect_linuxinput.c */ -HRESULT linuxinput_create_effect(int* fd, REFGUID rguid, LPDIRECTINPUTEFFECT* peff); +HRESULT linuxinput_create_effect(int* fd, REFGUID rguid, struct list *parent_list_entry, LPDIRECTINPUTEFFECT* peff); HRESULT linuxinput_get_info_A(int fd, REFGUID rguid, LPDIEFFECTINFOA info); HRESULT linuxinput_get_info_W(int fd, REFGUID rguid, LPDIEFFECTINFOW info); @@ -1053,7 +1053,7 @@ static HRESULT WINAPI JoystickAImpl_CreateEffect(LPDIRECTINPUTDEVICE8A iface, if (!(new_effect = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_effect)))) return DIERR_OUTOFMEMORY; - retval = linuxinput_create_effect(&This->joyfd, rguid, &new_effect->ref); + retval = linuxinput_create_effect(&This->joyfd, rguid, &new_effect->entry, &new_effect->ref); if (retval != DI_OK) { HeapFree(GetProcessHeap(), 0, new_effect); diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c index 4727a5a..567dad0 100644 --- a/dlls/dinput/tests/joystick.c +++ b/dlls/dinput/tests/joystick.c @@ -18,6 +18,7 @@ #define DIRECTINPUT_VERSION 0x0700 +#define COBJMACROS #include <windows.h> #include <math.h> @@ -85,6 +86,12 @@ typedef struct tagJoystickInfo DWORD dZone; } JoystickInfo; +static int get_refcount(IUnknown *object) +{ + IUnknown_AddRef( object ); + return IUnknown_Release( object ); +} + static BOOL CALLBACK EnumAxes( const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext) @@ -331,6 +338,45 @@ static BOOL CALLBACK EnumJoysticks( ok(js.rgdwPOV[3] == -1, "Default for unassigned POV should be -1 not: %d\n", js.rgdwPOV[3]); } + if (caps.dwFlags & DIDC_FORCEFEEDBACK) + { + DWORD axes[2] = {DIJOFS_X, DIJOFS_Y}; + LONG direction[2] = {0, 0}; + DICONSTANTFORCE force = {0}; + DIEFFECT eff; + LPDIRECTINPUTEFFECT effect = NULL; + LONG cnt1, cnt2; + + trace("Testing force-feedback\n"); + memset(&eff, 0, sizeof(eff)); + eff.dwSize = sizeof(eff); + eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; + eff.dwDuration = INFINITE; + eff.dwGain = DI_FFNOMINALMAX; + eff.dwTriggerButton = DIEB_NOTRIGGER; + eff.cAxes = sizeof(axes) / sizeof(axes[0]); + eff.rgdwAxes = axes; + eff.rglDirection = direction; + eff.cbTypeSpecificParams = sizeof(force); + eff.lpvTypeSpecificParams = &force; + + cnt1 = get_refcount((IUnknown*)pJoystick); + + hr = IDirectInputDevice2_CreateEffect((LPDIRECTINPUTDEVICE2)pJoystick, &GUID_ConstantForce, + &eff, &effect, NULL); + ok(hr == DI_OK, "IDirectInputDevice_CreateEffect() failed: %s\n", DXGetErrorString8(hr)); + cnt2 = get_refcount((IUnknown*)pJoystick); + ok(cnt1 == cnt2, "Ref count is wrong %d != %d\n", cnt1, cnt2); + + if (effect) + { + ref = IUnknown_Release(effect); + ok(ref == 0, "IDirectInputDevice_Release() reference count = %d\n", ref); + } + cnt1 = get_refcount((IUnknown*)pJoystick); + ok(cnt1 == cnt2, "Ref count is wrong %d != %d\n", cnt1, cnt2); + } + if (winetest_interactive) { trace("You have 30 seconds to test all axes, sliders, POVs and buttons\n"); count = 300;
1
0
0
0
Vitaliy Margolen : dinput: Use Wine list for effects list.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: aa3694d8ac34e6a3071c9a83661b76929f9c2735 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa3694d8ac34e6a3071c9a836…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sat Jul 5 22:24:51 2008 -0600 dinput: Use Wine list for effects list. --- dlls/dinput/device_private.h | 6 ++ dlls/dinput/joystick_linuxinput.c | 99 ++++++++++++++++++++---------------- 2 files changed, 61 insertions(+), 44 deletions(-) diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index edd1f4b..9321250 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -99,6 +99,12 @@ typedef struct extern DWORD joystick_map_pov(POINTL *p); extern LONG joystick_map_axis(ObjProps *props, int val); +typedef struct +{ + struct list entry; + LPDIRECTINPUTEFFECT ref; +} effect_list_item; + /** * Callback Data used by specific callback * for EnumObject on 'W' interfaces diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 24ed7d3..d3185d3 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -55,6 +55,7 @@ #include "wine/debug.h" #include "wine/unicode.h" +#include "wine/list.h" #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -139,13 +140,6 @@ struct wine_input_absinfo { LONG flat; }; -typedef struct EffectListItem EffectListItem; -struct EffectListItem -{ - LPDIRECTINPUTEFFECT ref; - struct EffectListItem* next; -}; - /* implemented in effect_linuxinput.c */ HRESULT linuxinput_create_effect(int* fd, REFGUID rguid, LPDIRECTINPUTEFFECT* peff); HRESULT linuxinput_get_info_A(int fd, REFGUID rguid, LPDIEFFECTINFOA info); @@ -197,7 +191,7 @@ struct JoystickImpl DWORD numButtons; /* Force feedback variables */ - EffectListItem* top_effect; + struct list ff_effects; int ff_state; }; @@ -438,6 +432,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm newDevice->base.dinput = dinput; newDevice->joyfd = -1; newDevice->joydev = &joydevs[index]; + list_init(&newDevice->ff_effects); #ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION newDevice->ff_state = FF_STATUS_STOPPED; #endif @@ -1042,7 +1037,7 @@ static HRESULT WINAPI JoystickAImpl_CreateEffect(LPDIRECTINPUTDEVICE8A iface, LPUNKNOWN pUnkOuter) { #ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION - EffectListItem* new = NULL; + effect_list_item* new_effect = NULL; HRESULT retval = DI_OK; #endif @@ -1055,20 +1050,29 @@ static HRESULT WINAPI JoystickAImpl_CreateEffect(LPDIRECTINPUTDEVICE8A iface, return DI_OK; #else - new = HeapAlloc(GetProcessHeap(), 0, sizeof(EffectListItem)); - new->next = This->top_effect; - This->top_effect = new; + if (!(new_effect = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_effect)))) + return DIERR_OUTOFMEMORY; - retval = linuxinput_create_effect(&(This->joyfd), rguid, &(new->ref)); + retval = linuxinput_create_effect(&This->joyfd, rguid, &new_effect->ref); if (retval != DI_OK) - return retval; + { + HeapFree(GetProcessHeap(), 0, new_effect); + return retval; + } if (lpeff != NULL) - retval = IDirectInputEffect_SetParameters(new->ref, lpeff, 0); - if (retval != DI_OK && retval != DI_DOWNLOADSKIPPED) - return retval; + { + retval = IDirectInputEffect_SetParameters(new_effect->ref, lpeff, 0); - *ppdef = new->ref; + if (retval != DI_OK && retval != DI_DOWNLOADSKIPPED) + { + HeapFree(GetProcessHeap(), 0, new_effect); + return retval; + } + } + + list_add_tail(&This->ff_effects, &new_effect->entry); + *ppdef = new_effect->ref; if (pUnkOuter != NULL) FIXME("Interface aggregation not implemented.\n"); @@ -1301,30 +1305,39 @@ static HRESULT WINAPI JoystickAImpl_SendForceFeedbackCommand( TRACE("(this=%p,%d)\n", This, dwFlags); #ifdef HAVE_STRUCT_FF_EFFECT_DIRECTION - if (dwFlags == DISFFC_STOPALL) { + switch (dwFlags) + { + case DISFFC_STOPALL: + { /* Stop all effects */ - EffectListItem* itr = This->top_effect; - while (itr) { - IDirectInputEffect_Stop(itr->ref); - itr = itr->next; - } - } else if (dwFlags == DISFFC_RESET) { + effect_list_item *itr; + + LIST_FOR_EACH_ENTRY(itr, &This->ff_effects, effect_list_item, entry) + IDirectInputEffect_Stop(itr->ref); + break; + } + + case DISFFC_RESET: + { + effect_list_item *itr, *ptr; + /* Stop, unload, release and free all effects */ /* This returns the device to its "bare" state */ - while (This->top_effect) { - EffectListItem* temp = This->top_effect; - IDirectInputEffect_Stop(temp->ref); - IDirectInputEffect_Unload(temp->ref); - IDirectInputEffect_Release(temp->ref); - This->top_effect = temp->next; - HeapFree(GetProcessHeap(), 0, temp); - } - } else if (dwFlags == DISFFC_PAUSE || dwFlags == DISFFC_CONTINUE) { + LIST_FOR_EACH_ENTRY_SAFE(itr, ptr, &This->ff_effects, effect_list_item, entry) + IDirectInputEffect_Release(itr->ref); + break; + } + case DISFFC_PAUSE: + case DISFFC_CONTINUE: FIXME("No support for Pause or Continue in linux\n"); - } else if (dwFlags == DISFFC_SETACTUATORSOFF - || dwFlags == DISFFC_SETACTUATORSON) { - FIXME("No direct actuator control in linux\n"); - } else { + break; + + case DISFFC_SETACTUATORSOFF: + case DISFFC_SETACTUATORSON: + FIXME("No direct actuator control in linux\n"); + break; + + default: FIXME("Unknown Force Feedback Command!\n"); return DIERR_INVALIDPARAM; } @@ -1345,9 +1358,9 @@ static HRESULT WINAPI JoystickAImpl_EnumCreatedEffectObjects( DWORD dwFlags) { /* this function is safe to call on non-ff-enabled builds */ - JoystickImpl* This = (JoystickImpl*)iface; - EffectListItem* itr = This->top_effect; + effect_list_item *itr, *ptr; + TRACE("(this=%p,%p,%p,%d)\n", This, lpCallback, pvRef, dwFlags); if (!lpCallback) @@ -1356,10 +1369,8 @@ static HRESULT WINAPI JoystickAImpl_EnumCreatedEffectObjects( if (dwFlags != 0) FIXME("Flags specified, but no flags exist yet (DX9)!\n"); - while (itr) { - (*lpCallback)(itr->ref, pvRef); - itr = itr->next; - } + LIST_FOR_EACH_ENTRY_SAFE(itr, ptr, &This->ff_effects, effect_list_item, entry) + (*lpCallback)(itr->ref, pvRef); return DI_OK; }
1
0
0
0
Vitaliy Margolen : dinput: Stop and unload effect when freeing it.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 91036a04a293caf2ac94a51954f23d390287bde3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91036a04a293caf2ac94a5195…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sat Jul 5 22:24:43 2008 -0600 dinput: Stop and unload effect when freeing it. --- dlls/dinput/effect_linuxinput.c | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 4a31ec1..ab72d2c 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -724,17 +724,6 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( return DI_OK; } -static ULONG WINAPI LinuxInputEffectImpl_Release( - LPDIRECTINPUTEFFECT iface) -{ - LinuxInputEffectImpl *This = (LinuxInputEffectImpl *)iface; - ULONG ref = InterlockedDecrement(&(This->ref)); - - if (ref == 0) - HeapFree(GetProcessHeap(), 0, This); - return ref; -} - static HRESULT WINAPI LinuxInputEffectImpl_Stop( LPDIRECTINPUTEFFECT iface) { @@ -768,6 +757,20 @@ static HRESULT WINAPI LinuxInputEffectImpl_Unload( return DI_OK; } +static ULONG WINAPI LinuxInputEffectImpl_Release(LPDIRECTINPUTEFFECT iface) +{ + LinuxInputEffectImpl *This = (LinuxInputEffectImpl *)iface; + ULONG ref = InterlockedDecrement(&(This->ref)); + + if (ref == 0) + { + LinuxInputEffectImpl_Stop(iface); + LinuxInputEffectImpl_Unload(iface); + HeapFree(GetProcessHeap(), 0, This); + } + return ref; +} + /****************************************************************************** * LinuxInputEffect */
1
0
0
0
Vitaliy Margolen : dinput: Add more traces. Prevent some traces from dereferencing NULL pointer.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 85e2aa1d8adb6ef9e160ed8c2f8e1a50bb29bba0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85e2aa1d8adb6ef9e160ed8c2…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sat Jul 5 22:24:37 2008 -0600 dinput: Add more traces. Prevent some traces from dereferencing NULL pointer. --- dlls/dinput/device.c | 2 +- dlls/dinput/effect_linuxinput.c | 6 +++--- dlls/dinput/joystick_linuxinput.c | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 2c4cc6d..54fefbe 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -179,7 +179,7 @@ const char *_dump_dinput_GUID(const GUID *guid) { return guids[i].name; } } - return "Unknown GUID"; + return debugstr_guid(guid); } void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) { diff --git a/dlls/dinput/effect_linuxinput.c b/dlls/dinput/effect_linuxinput.c index 7d603bb..4a31ec1 100644 --- a/dlls/dinput/effect_linuxinput.c +++ b/dlls/dinput/effect_linuxinput.c @@ -191,7 +191,7 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid) TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval); TRACE(" - cAxes: %d\n", eff->cAxes); TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes); - if (TRACE_ON(dinput)) { + if (TRACE_ON(dinput) && eff->rgdwAxes) { TRACE(" "); for (i = 0; i < eff->cAxes; ++i) TRACE("%d ", eff->rgdwAxes[i]); @@ -261,7 +261,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Download( if (errno == ENOMEM) { return DIERR_DEVICEFULL; } else { - FIXME("Could not upload effect. Assuming a disconnected device.\n"); + FIXME("Could not upload effect. Assuming a disconnected device %d \"%s\".\n", *This->fd, strerror(errno)); return DIERR_INPUTLOST; } } @@ -824,7 +824,7 @@ HRESULT linuxinput_create_effect( HeapFree(GetProcessHeap(), 0, newEffect); return DIERR_INVALIDPARAM; default: - FIXME("Unknown force type.\n"); + FIXME("Unknown force type 0x%x.\n", type); HeapFree(GetProcessHeap(), 0, newEffect); return DIERR_INVALIDPARAM; } diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 13bc1fb..24ed7d3 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -637,6 +637,8 @@ static HRESULT WINAPI JoystickAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) } } } + else + WARN("Failed to acquire: %x\n", res); return res; }
1
0
0
0
Eric Pouech : winhelp: Remove the search button, hook the index button to the Finder, and add a new summary button to go back to main page.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: fa25f187c37f38d48c1bfaa2a99d4f937b6571f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa25f187c37f38d48c1bfaa2a…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 5 21:33:37 2008 +0200 winhelp: Remove the search button, hook the index button to the Finder, and add a new summary button to go back to main page. --- programs/winhlp32/Bg.rc | 4 ++-- programs/winhlp32/Cs.rc | 4 ++-- programs/winhlp32/Da.rc | 4 ++-- programs/winhlp32/De.rc | 4 ++-- programs/winhlp32/En.rc | 4 ++-- programs/winhlp32/Eo.rc | 4 ++-- programs/winhlp32/Es.rc | 4 ++-- programs/winhlp32/Fi.rc | 4 ++-- programs/winhlp32/Fr.rc | 4 ++-- programs/winhlp32/Hu.rc | 4 ++-- programs/winhlp32/It.rc | 4 ++-- programs/winhlp32/Ko.rc | 4 ++-- programs/winhlp32/Nl.rc | 4 ++-- programs/winhlp32/No.rc | 4 ++-- programs/winhlp32/Pl.rc | 4 ++-- programs/winhlp32/Pt.rc | 8 ++++---- programs/winhlp32/Rm.rc | 4 ++-- programs/winhlp32/Ru.rc | 4 ++-- programs/winhlp32/Si.rc | 4 ++-- programs/winhlp32/Sk.rc | 4 ++-- programs/winhlp32/Sv.rc | 4 ++-- programs/winhlp32/Tr.rc | 4 ++-- programs/winhlp32/Wa.rc | 4 ++-- programs/winhlp32/Zh.rc | 4 ++-- programs/winhlp32/winhelp.c | 4 ++-- programs/winhlp32/winhelp_res.h | 2 +- 26 files changed, 53 insertions(+), 53 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fa25f187c37f38d48c1bf…
1
0
0
0
Eric Pouech : winhelp: Removed the topics button, and forward search and topics to the same prop sheet.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 841720e491d4d82a83a3c83405e4ec59ef9f6376 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=841720e491d4d82a83a3c8340…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 5 21:33:19 2008 +0200 winhelp: Removed the topics button, and forward search and topics to the same prop sheet. --- programs/winhlp32/Bg.rc | 1 - programs/winhlp32/Cs.rc | 1 - programs/winhlp32/Da.rc | 1 - programs/winhlp32/De.rc | 1 - programs/winhlp32/En.rc | 9 +++++++- programs/winhlp32/Eo.rc | 1 - programs/winhlp32/Es.rc | 1 - programs/winhlp32/Fi.rc | 1 - programs/winhlp32/Fr.rc | 1 - programs/winhlp32/Hu.rc | 1 - programs/winhlp32/It.rc | 1 - programs/winhlp32/Ko.rc | 1 - programs/winhlp32/Nl.rc | 1 - programs/winhlp32/No.rc | 1 - programs/winhlp32/Pl.rc | 1 - programs/winhlp32/Pt.rc | 2 - programs/winhlp32/Rm.rc | 1 - programs/winhlp32/Ru.rc | 1 - programs/winhlp32/Si.rc | 1 - programs/winhlp32/Sk.rc | 1 - programs/winhlp32/Sv.rc | 1 - programs/winhlp32/Tr.rc | 1 - programs/winhlp32/Wa.rc | 1 - programs/winhlp32/Zh.rc | 1 - programs/winhlp32/macro.c | 4 +- programs/winhlp32/winhelp.c | 41 +++++++++++++++++++++++++++++++++++--- programs/winhlp32/winhelp.h | 2 +- programs/winhlp32/winhelp_res.h | 2 +- 28 files changed, 49 insertions(+), 33 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=841720e491d4d82a83a3c…
1
0
0
0
Maarten Lankhorst : quartz: Fix parser/ pullpin to only care about the state transition stopped<->playing.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 53782ca47acfa8e5d7ae72b59602840e3b35cd81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53782ca47acfa8e5d7ae72b59…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Jul 4 18:43:05 2008 -0700 quartz: Fix parser/pullpin to only care about the state transition stopped<->playing. --- dlls/quartz/parser.c | 36 +++++++++++++++----- dlls/quartz/pin.c | 88 ++++++++++++++++++++++++++++++++++++------------- dlls/quartz/pin.h | 3 +- 3 files changed, 93 insertions(+), 34 deletions(-) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 97be991..0848e84 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -219,15 +219,35 @@ HRESULT WINAPI Parser_Stop(IBaseFilter * iface) { ParserImpl *This = (ParserImpl *)iface; PullPin *pin = (PullPin *)This->ppPins[0]; + int i; TRACE("()\n"); EnterCriticalSection(&pin->thread_lock); + + IAsyncReader_BeginFlush(This->pInputPin->pReader); EnterCriticalSection(&This->csFilter); + + if (This->state == State_Stopped) { - This->state = State_Stopped; + LeaveCriticalSection(&This->csFilter); + LeaveCriticalSection(&pin->thread_lock); + return S_OK; } + + This->state = State_Stopped; + + for (i = 1; i < (This->cStreams + 1); i++) + { + OutputPin_DecommitAllocator((OutputPin *)This->ppPins[i]); + } + LeaveCriticalSection(&This->csFilter); + + PullPin_PauseProcessing(This->pInputPin); + PullPin_WaitForStateChange(This->pInputPin, INFINITE); + IAsyncReader_EndFlush(This->pInputPin->pReader); + LeaveCriticalSection(&pin->thread_lock); return S_OK; } @@ -260,8 +280,6 @@ HRESULT WINAPI Parser_Pause(IBaseFilter * iface) This->state = State_Paused; LeaveCriticalSection(&This->csFilter); - if (SUCCEEDED(hr)) - hr = PullPin_PauseProcessing(This->pInputPin); LeaveCriticalSection(&pin->thread_lock); return hr; @@ -280,8 +298,9 @@ HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart) EnterCriticalSection(&pin->thread_lock); EnterCriticalSection(&This->csFilter); { - if (This->state == State_Running) + if (This->state == State_Running || This->state == State_Paused) { + This->state = State_Running; LeaveCriticalSection(&This->csFilter); LeaveCriticalSection(&pin->thread_lock); return S_OK; @@ -289,12 +308,11 @@ HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart) This->rtStreamStart = tStart; - if (SUCCEEDED(hr) && (This->state == State_Stopped)) + for (i = 1; i < (This->cStreams + 1); i++) { - for (i = 1; i < (This->cStreams + 1); i++) - { - OutputPin_CommitAllocator((OutputPin *)This->ppPins[i]); - } + hr = OutputPin_CommitAllocator((OutputPin *)This->ppPins[i]); + if (FAILED(hr)) + break; } if (SUCCEEDED(hr)) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 5bce9bb..0ecf055 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -1175,6 +1175,35 @@ HRESULT OutputPin_CommitAllocator(OutputPin * This) return hr; } +HRESULT OutputPin_DecommitAllocator(OutputPin * This) +{ + HRESULT hr = S_OK; + + TRACE("(%p)->()\n", This); + + EnterCriticalSection(This->pin.pCritSec); + { + if (!This->pin.pConnectedTo || !This->pMemInputPin) + hr = VFW_E_NOT_CONNECTED; + else + { + IMemAllocator * pAlloc = NULL; + + hr = IMemInputPin_GetAllocator(This->pMemInputPin, &pAlloc); + + if (SUCCEEDED(hr)) + hr = IMemAllocator_Decommit(pAlloc); + + if (pAlloc) + IMemAllocator_Release(pAlloc); + } + } + LeaveCriticalSection(This->pin.pCritSec); + + TRACE("--> %08x\n", hr); + return hr; +} + HRESULT OutputPin_DeliverDisconnect(OutputPin * This) { HRESULT hr; @@ -1416,11 +1445,11 @@ static void CALLBACK PullPin_Flush(PullPin *This) IMediaSample *pSample; TRACE("Flushing!\n"); - EnterCriticalSection(This->pin.pCritSec); if (This->pReader) { /* Flush outstanding samples */ IAsyncReader_BeginFlush(This->pReader); + for (;;) { DWORD_PTR dwUser; @@ -1437,10 +1466,9 @@ static void CALLBACK PullPin_Flush(PullPin *This) IAsyncReader_EndFlush(This->pReader); } - LeaveCriticalSection(This->pin.pCritSec); } -static void CALLBACK PullPin_Thread_Process(PullPin *This, BOOL pause) +static void CALLBACK PullPin_Thread_Process(PullPin *This) { HRESULT hr; IMediaSample * pSample = NULL; @@ -1467,12 +1495,9 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This, BOOL pause) if (FAILED(hr)) ERR("Request error: %x\n", hr); - if (!pause) - { - EnterCriticalSection(This->pin.pCritSec); - SetEvent(This->hEventStateChanged); - LeaveCriticalSection(This->pin.pCritSec); - } + EnterCriticalSection(This->pin.pCritSec); + SetEvent(This->hEventStateChanged); + LeaveCriticalSection(This->pin.pCritSec); if (SUCCEEDED(hr)) do @@ -1510,23 +1535,20 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This, BOOL pause) /* Can't reset state to Sleepy here because that might race, instead PauseProcessing will do that for us * Flush remaining samples */ - TRACE("Almost done..\n"); - if (This->fnDone) This->fnDone(This->pin.pUserData); - if (pause) - { - EnterCriticalSection(This->pin.pCritSec); - This->state = Req_Sleepy; - SetEvent(This->hEventStateChanged); - LeaveCriticalSection(This->pin.pCritSec); - } - - TRACE("End: %08x, %d\n", hr, This->stop_playback); } +static void CALLBACK PullPin_Thread_Pause(PullPin *This) +{ + EnterCriticalSection(This->pin.pCritSec); + This->state = Req_Sleepy; + SetEvent(This->hEventStateChanged); + LeaveCriticalSection(This->pin.pCritSec); +} + static void CALLBACK PullPin_Thread_Stop(PullPin *This) { TRACE("(%p)->()\n", This); @@ -1545,6 +1567,16 @@ static void CALLBACK PullPin_Thread_Stop(PullPin *This) ExitThread(0); } +static void CALLBACK PullPin_Thread_Flush(PullPin *This) +{ + PullPin_Flush(This); + + EnterCriticalSection(This->pin.pCritSec); + This->state = Req_Sleepy; + SetEvent(This->hEventStateChanged); + LeaveCriticalSection(This->pin.pCritSec); +} + static DWORD WINAPI PullPin_Thread_Main(LPVOID pv) { PullPin *This = pv; @@ -1561,8 +1593,9 @@ static DWORD WINAPI PullPin_Thread_Main(LPVOID pv) switch (This->state) { case Req_Die: PullPin_Thread_Stop(This); break; - case Req_Run: PullPin_Thread_Process(This, FALSE); break; - case Req_Pause: PullPin_Thread_Process(This, TRUE); break; + case Req_Run: PullPin_Thread_Process(This); break; + case Req_Pause: PullPin_Thread_Pause(This); break; + case Req_Flush: PullPin_Thread_Flush(This); break; case Req_Sleepy: ERR("Should not be signalled with SLEEPY!\n"); break; default: ERR("Unknown state request: %d\n", This->state); break; } @@ -1710,13 +1743,20 @@ HRESULT WINAPI PullPin_BeginFlush(IPin * iface) EnterCriticalSection(&This->thread_lock); { + if (This->pReader) + IAsyncReader_BeginFlush(This->pReader); PullPin_WaitForStateChange(This, INFINITE); - if (This->hThread && !This->stop_playback) + if (This->hThread && This->state == Req_Run) { PullPin_PauseProcessing(This); PullPin_WaitForStateChange(This, INFINITE); } + + This->state = Req_Flush; + ResetEvent(This->hEventStateChanged); + SetEvent(This->thread_sleepy); + PullPin_WaitForStateChange(This, INFINITE); } LeaveCriticalSection(&This->thread_lock); @@ -1740,7 +1780,7 @@ HRESULT WINAPI PullPin_EndFlush(IPin * iface) FILTER_STATE state; IBaseFilter_GetState(This->pin.pinInfo.pFilter, INFINITE, &state); - if (This->stop_playback && state == State_Running) + if (This->stop_playback && state != State_Stopped) PullPin_StartProcessing(This); PullPin_WaitForStateChange(This, INFINITE); diff --git a/dlls/quartz/pin.h b/dlls/quartz/pin.h index b67ff1b..4170ca5 100644 --- a/dlls/quartz/pin.h +++ b/dlls/quartz/pin.h @@ -52,7 +52,6 @@ typedef HRESULT (* CLEANUPPROC) (LPVOID userdata); * If you implement it (it can be NULL for default behavior), you have to * call IMemAllocator_GetBuffer and IMemAllocator_RequestBuffer * This is useful if you want to request more than 1 buffer at simultaneously - * If PullPin->flushed is set, it means that all buffers queued previously are gone * * This will also cause the Sample Proc to be called with empty buffers to indicate * failure in retrieving the sample. @@ -141,6 +140,7 @@ typedef struct PullPin #define Req_Die 1 #define Req_Run 2 #define Req_Pause 3 +#define Req_Flush 4 /*** Constructors ***/ HRESULT InputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo, SAMPLEPROC_PUSH pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, CLEANUPPROC pCleanUp, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin); @@ -184,6 +184,7 @@ HRESULT WINAPI OutputPin_EndFlush(IPin * iface); HRESULT WINAPI OutputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate); HRESULT OutputPin_CommitAllocator(OutputPin * This); +HRESULT OutputPin_DecommitAllocator(OutputPin * This); HRESULT OutputPin_GetDeliveryBuffer(OutputPin * This, IMediaSample ** ppSample, REFERENCE_TIME * tStart, REFERENCE_TIME * tStop, DWORD dwFlags); HRESULT OutputPin_SendSample(OutputPin * This, IMediaSample * pSample); HRESULT OutputPin_DeliverDisconnect(OutputPin * This);
1
0
0
0
Maarten Lankhorst : quartz: Only call begin process functions in transform filter when stopped.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: e58855e0e913adc55df56d31020f027d55afe522 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e58855e0e913adc55df56d310…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Jul 4 18:42:09 2008 -0700 quartz: Only call begin process functions in transform filter when stopped. Fixes some graphical glitches that may occur otherwise. --- dlls/quartz/transform.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c index f37e9e3..d073970 100644 --- a/dlls/quartz/transform.c +++ b/dlls/quartz/transform.c @@ -349,7 +349,7 @@ static HRESULT WINAPI TransformFilter_Pause(IBaseFilter * iface) EnterCriticalSection(&This->csFilter); { if (This->state == State_Stopped) - IBaseFilter_Run(iface, -1); + ((InputPin *)This->ppPins[0])->end_of_stream = 0; This->state = State_Paused; } @@ -368,13 +368,15 @@ static HRESULT WINAPI TransformFilter_Run(IBaseFilter * iface, REFERENCE_TIME tS EnterCriticalSection(&This->csFilter); { if (This->state == State_Stopped) + { ((InputPin *)This->ppPins[0])->end_of_stream = 0; + if (This->pFuncsTable->pfnProcessBegin) + This->pFuncsTable->pfnProcessBegin(This); + OutputPin_CommitAllocator((OutputPin *)This->ppPins[1]); + } This->rtStreamStart = tStart; This->state = State_Running; - OutputPin_CommitAllocator((OutputPin *)This->ppPins[1]); - if (This->pFuncsTable->pfnProcessBegin) - This->pFuncsTable->pfnProcessBegin(This); } LeaveCriticalSection(&This->csFilter);
1
0
0
0
Maarten Lankhorst : quartz: Make sure transform filter commits allocator.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 11e2b1ab2b0a867c8124a226475a12b199a1c0d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11e2b1ab2b0a867c8124a2264…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Jul 4 16:59:01 2008 -0700 quartz: Make sure transform filter commits allocator. --- dlls/quartz/transform.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c index d602c69..f37e9e3 100644 --- a/dlls/quartz/transform.c +++ b/dlls/quartz/transform.c @@ -349,7 +349,7 @@ static HRESULT WINAPI TransformFilter_Pause(IBaseFilter * iface) EnterCriticalSection(&This->csFilter); { if (This->state == State_Stopped) - ((InputPin *)This->ppPins[0])->end_of_stream = 0; + IBaseFilter_Run(iface, -1); This->state = State_Paused; }
1
0
0
0
Maarten Lankhorst : quartz: Fix tiny bug in IGraphBuilder_Render.
by Alexandre Julliard
07 Jul '08
07 Jul '08
Module: wine Branch: master Commit: 6e4288ee70957c3823ac7fb5879df1b130362524 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e4288ee70957c3823ac7fb58…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Fri Jul 4 16:42:59 2008 -0700 quartz: Fix tiny bug in IGraphBuilder_Render. --- dlls/quartz/filtergraph.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 9f6f79a..8a5ece7 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -1257,7 +1257,7 @@ static HRESULT WINAPI FilterGraph2_Render(IFilterGraph2 *iface, IPin *ppinOut) TRACE("SubType %s\n", debugstr_guid(&mt->subtype)); /* Only enumerate once, this doesn't account for all previous ones, but this should be enough nonetheless */ - if (IsEqualIID(&tab[0], &mt->majortype) && IsEqualIID(&tab[0], &mt->majortype)) + if (IsEqualIID(&tab[0], &mt->majortype) && IsEqualIID(&tab[1], &mt->subtype)) { DeleteMediaType(mt); continue;
1
0
0
0
← Newer
1
...
90
91
92
93
94
95
96
...
112
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200