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 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
838 discussions
Start a n
N
ew thread
Alexandre Julliard : user32/tests: Fix test failures when the low-level hook cannot be set.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: fb2df6752e1837380b52e16fb49ca55243132b80 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb2df6752e1837380b52e16fb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 22 12:00:58 2011 +0200 user32/tests: Fix test failures when the low-level hook cannot be set. --- dlls/user32/tests/msg.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 5fbf440..afca225 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -2025,7 +2025,8 @@ static void ok_sequence_(const struct message *expected_list, const char *contex while (expected->message && actual->message) { - if (expected->message == actual->message) + if (expected->message == actual->message && + !((expected->flags ^ actual->flags) & (hook|winevent_hook|kbd_hook))) { if (expected->flags & wparam) { @@ -2130,7 +2131,8 @@ static void ok_sequence_(const struct message *expected_list, const char *contex /* silently drop hook messages if there is no support for them */ else if ((expected->flags & optional) || ((expected->flags & hook) && !hCBT_hook) || - ((expected->flags & winevent_hook) && !hEvent_hook)) + ((expected->flags & winevent_hook) && !hEvent_hook) || + ((expected->flags & kbd_hook) && !hKBD_hook)) expected++; else if (todo) { @@ -13213,7 +13215,7 @@ static void test_hotkey(void) } hKBD_hook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, GetModuleHandle(NULL), 0); - ok(hKBD_hook != NULL, "failed to install hook, err %i\n", GetLastError()); + if (!hKBD_hook) win_skip("WH_KEYBOARD_LL is not supported\n"); /* Same key combination, different id */ SetLastError(0xdeadbeef); @@ -13409,7 +13411,7 @@ static void test_hotkey(void) ret = UnregisterHotKey(NULL, 5); ok(ret == TRUE, "expected TRUE, got %i, err=%d\n", ret, GetLastError()); - UnhookWindowsHookEx(hKBD_hook); + if (hKBD_hook) UnhookWindowsHookEx(hKBD_hook); hKBD_hook = NULL; end:
1
0
0
0
Alexandre Julliard : user32/tests: Fix some last error tests that fail on Windows.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: a900fe7c9e751222e02b3dd031334b01b087ac23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a900fe7c9e751222e02b3dd03…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 22 12:00:12 2011 +0200 user32/tests: Fix some last error tests that fail on Windows. --- dlls/user32/tests/msg.c | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 01933b8..5fbf440 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -13169,7 +13169,8 @@ static void test_hotkey(void) SetLastError(0xdeadbeef); ret = UnregisterHotKey(NULL, 0); ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); if (ret == TRUE) { @@ -13185,7 +13186,8 @@ static void test_hotkey(void) SetLastError(0xdeadbeef); ret = UnregisterHotKey(test_window, 0); ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); /* Search for a Windows Key + letter combination that hasn't been registered */ for (hotkey_letter = 0x41; hotkey_letter <= 0x51; hotkey_letter ++) @@ -13199,7 +13201,8 @@ static void test_hotkey(void) } else { - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); } } @@ -13216,19 +13219,22 @@ static void test_hotkey(void) SetLastError(0xdeadbeef); ret = RegisterHotKey(test_window, 4, MOD_WIN, hotkey_letter); ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); /* Same key combination, different window */ SetLastError(0xdeadbeef); ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter); ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); /* Register the same hotkey twice */ SetLastError(0xdeadbeef); ret = RegisterHotKey(test_window, 5, MOD_WIN, hotkey_letter); ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_HOTKEY_ALREADY_REGISTERED || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); /* Window on another thread */ taskbar_window = FindWindowA("Shell_TrayWnd", NULL); @@ -13241,7 +13247,8 @@ static void test_hotkey(void) SetLastError(0xdeadbeef); ret = RegisterHotKey(taskbar_window, 5, 0, hotkey_letter); ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_WINDOW_OF_OTHER_THREAD, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_WINDOW_OF_OTHER_THREAD || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); } /* Inject the appropriate key sequence */ @@ -13345,7 +13352,8 @@ static void test_hotkey(void) SetLastError(0xdeadbeef); ret = UnregisterHotKey(test_window, 5); ok(ret == FALSE, "expected FALSE, got %i\n", ret); - ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED, "unexpected error %d\n", GetLastError()); + ok(GetLastError() == ERROR_HOTKEY_NOT_REGISTERED || broken(GetLastError() == 0xdeadbeef), + "unexpected error %d\n", GetLastError()); /* Register thread hotkey */ ret = RegisterHotKey(NULL, 5, MOD_WIN, hotkey_letter);
1
0
0
0
Alexandre Julliard : user32/tests: Mark some messages optional in the SetParent sequence.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 5be95f40c5c03a0464ce1d79bff612966e88f298 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5be95f40c5c03a0464ce1d79b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 22 11:46:27 2011 +0200 user32/tests: Mark some messages optional in the SetParent sequence. --- dlls/user32/tests/msg.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 2d903f0..01933b8 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -12839,20 +12839,20 @@ static const struct message WmSetParentSeq_2[] = { { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { HCBT_SETFOCUS, hook|optional }, - { WM_NCACTIVATE, sent|wparam, 0 }, - { WM_ACTIVATE, sent|wparam, 0 }, - { WM_ACTIVATEAPP, sent|wparam, 0 }, + { WM_NCACTIVATE, sent|wparam|optional, 0 }, + { WM_ACTIVATE, sent|wparam|optional, 0 }, + { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, { WM_KILLFOCUS, sent|wparam, 0 }, { EVENT_OBJECT_PARENTCHANGE, winevent_hook|wparam|lparam, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE }, { HCBT_ACTIVATE, hook }, { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE }, - { WM_NCACTIVATE, sent|wparam, 1 }, - { WM_ACTIVATE, sent|wparam, 1 }, + { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, + { WM_NCACTIVATE, sent|wparam|optional, 1 }, + { WM_ACTIVATE, sent|wparam|optional, 1 }, { HCBT_SETFOCUS, hook }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_SETFOCUS, sent|defwinproc }, + { WM_SETFOCUS, sent|optional|defwinproc }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOREDRAW|SWP_NOSIZE|SWP_NOCLIENTSIZE }, { WM_MOVE, sent|defwinproc|wparam, 0 }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
1
0
0
0
Lucas Fialho Zawacki : dinput: SetActionMap setting the axis range according to the action format.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 8cc44cb8c38e390d9fa5ae9ed69764f31a6c8513 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8cc44cb8c38e390d9fa5ae9ed…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Thu Jul 21 15:37:15 2011 -0300 dinput: SetActionMap setting the axis range according to the action format. --- dlls/dinput/device.c | 8 ++++++++ dlls/dinput8/tests/device.c | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 2bd5d6c..58d4e14 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1483,9 +1483,17 @@ HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface DWORD dwFlags) { DIPROPDWORD dp; + DIPROPRANGE dpr; FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags); + dpr.diph.dwSize = sizeof(DIPROPRANGE); + dpr.lMin = lpdiaf->lAxisMin; + dpr.lMax = lpdiaf->lAxisMax; + dpr.diph.dwHeaderSize = sizeof(DIPROPHEADER); + dpr.diph.dwHow = DIPH_DEVICE; + IDirectInputDevice8_SetProperty(iface, DIPROP_RANGE, &dpr.diph); + if (lpdiaf->dwBufferSize > 0) { dp.diph.dwSize = sizeof(DIPROPDWORD); diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c index cedad80..31e2e3f 100644 --- a/dlls/dinput8/tests/device.c +++ b/dlls/dinput8/tests/device.c @@ -132,6 +132,7 @@ static BOOL CALLBACK enumeration_callback( { HRESULT hr; DIPROPDWORD dp; + DIPROPRANGE dpr; struct enum_data *data = pvRef; if (!data) return DIENUM_CONTINUE; @@ -179,6 +180,20 @@ static BOOL CALLBACK enumeration_callback( ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr); ok (dp.dwData == data->lpdiaf->dwBufferSize, "SetActionMap must set the buffer, buffersize=%d\n", dp.dwData); + /* Test axis range */ + memset(&dpr, 0, sizeof(dpr)); + dpr.diph.dwSize = sizeof(dpr); + dpr.diph.dwHeaderSize = sizeof(DIPROPHEADER); + dpr.diph.dwHow = DIPH_DEVICE; + + hr = IDirectInputDevice_GetProperty(lpdid, DIPROP_RANGE, &dpr.diph); + /* Only test if device supports the range property */ + if (SUCCEEDED(hr)) + { + ok (dpr.lMin == data->lpdiaf->lAxisMin, "SetActionMap must set the min axis range expected=%d got=%d\n", data->lpdiaf->lAxisMin, dpr.lMin); + ok (dpr.lMax == data->lpdiaf->lAxisMax, "SetActionMap must set the max axis range expected=%d got=%d\n", data->lpdiaf->lAxisMax, dpr.lMax); + } + /* SetActionMap has set the data format so now it should work */ hr = IDirectInputDevice8_Acquire(lpdid); ok (SUCCEEDED(hr), "Acquire failed hr=%08x\n", hr);
1
0
0
0
Lucas Fialho Zawacki : dinput: SetActionMap for joysticks.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 79bd7249e471bbdeb665547a1a3a75454c6c41f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79bd7249e471bbdeb665547a1…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Thu Jul 21 15:38:43 2011 -0300 dinput: SetActionMap for joysticks. --- dlls/dinput/joystick.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 59 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c index b5c028c..2d8a818 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c @@ -500,9 +500,67 @@ HRESULT WINAPI JoystickWGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, LPCWSTR lpszUserName, DWORD dwFlags) { + JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface); + DIDATAFORMAT data_format; + DIOBJECTDATAFORMAT *obj_df = NULL; + int i, action = 0, num_actions = 0; + unsigned int offset = 0; + FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags); - return DI_NOEFFECT; + if (This->base.acquired) return DIERR_ACQUIRED; + + data_format.dwSize = sizeof(data_format); + data_format.dwObjSize = sizeof(DIOBJECTDATAFORMAT); + data_format.dwFlags = DIDF_RELAXIS; + data_format.dwDataSize = lpdiaf->dwDataSize; + + /* count the actions */ + for (i=0; i < lpdiaf->dwNumActions; i++) + if (IsEqualGUID(&This->base.guid, &lpdiaf->rgoAction[i].guidInstance)) + num_actions++; + + if (num_actions == 0) return DI_NOEFFECT; + + This->base.num_actions = num_actions; + + /* Construct the dataformat and actionmap */ + obj_df = HeapAlloc(GetProcessHeap(), 0, sizeof(DIOBJECTDATAFORMAT)*num_actions); + data_format.rgodf = (LPDIOBJECTDATAFORMAT)obj_df; + data_format.dwNumObjs = num_actions; + + This->base.action_map = HeapAlloc(GetProcessHeap(), 0, sizeof(ActionMap)*num_actions); + + for (i = 0; i < lpdiaf->dwNumActions; i++) + { + if (IsEqualGUID(&This->base.guid, &lpdiaf->rgoAction[i].guidInstance)) + { + LPDIDATAFORMAT df = This->base.data_format.wine_df; + DWORD inst = DIDFT_GETINSTANCE(lpdiaf->rgoAction[i].dwObjID); + DWORD type = DIDFT_GETTYPE(lpdiaf->rgoAction[i].dwObjID); + LPDIOBJECTDATAFORMAT obj; + + if (type == DIDFT_PSHBUTTON) type = DIDFT_BUTTON; + if (type == DIDFT_RELAXIS) type = DIDFT_AXIS; + + obj = dataformat_to_odf_by_type(df, inst, type); + + memcpy(&obj_df[action], obj, df->dwObjSize); + + This->base.action_map[action].uAppData = lpdiaf->rgoAction[i].uAppData; + This->base.action_map[action].offset = offset; + obj_df[action].dwOfs = offset; + offset += (type & DIDFT_BUTTON) ? 1 : 4; + + action++; + } + } + + IDirectInputDevice8_SetDataFormat(iface, &data_format); + + HeapFree(GetProcessHeap(), 0, obj_df); + + return IDirectInputDevice8WImpl_SetActionMap(iface, lpdiaf, lpszUserName, dwFlags); } HRESULT WINAPI JoystickAGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface,
1
0
0
0
Lucas Fialho Zawacki : dinput: BuildActionMap for all joysticks. For the moment only for buttons and axis.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 31fdae5b4cd0397107f3e32d9f2e073d12320c2d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31fdae5b4cd0397107f3e32d9…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Thu Jul 21 15:36:31 2011 -0300 dinput: BuildActionMap for all joysticks. For the moment only for buttons and axis. --- dlls/dinput/device.c | 23 +++++++++++++++++++++++ dlls/dinput/device_private.h | 1 + dlls/dinput/dinput_private.h | 1 + dlls/dinput/joystick.c | 40 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 64 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 22632ea..2bd5d6c 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -366,6 +366,29 @@ static inline LPDIOBJECTDATAFORMAT dataformat_to_odf(LPCDIDATAFORMAT df, int idx return (LPDIOBJECTDATAFORMAT)((LPBYTE)df->rgodf + idx * df->dwObjSize); } +/* dataformat_to_odf_by_type + * Find the Nth object of the selected type in the DataFormat + */ +LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) +{ + int i, nfound = 0; + + for (i=0; i < df->dwNumObjs; i++) + { + LPDIOBJECTDATAFORMAT odf = dataformat_to_odf(df, i); + + if (odf->dwType & type) + { + if (n == nfound) + return odf; + + nfound++; + } + } + + return NULL; +} + static HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format) { DataTransform *dt; diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index 503698a..6c061b2 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -125,6 +125,7 @@ extern void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) DECLSPEC_HIDDEN; extern const char *_dump_dinput_GUID(const GUID *guid) DECLSPEC_HIDDEN; extern DWORD semantic_to_obj_id(IDirectInputDeviceImpl* This, DWORD dwSemantic) DECLSPEC_HIDDEN; +extern LPDIOBJECTDATAFORMAT dataformat_to_odf_by_type(LPCDIDATAFORMAT df, int n, DWORD type) DECLSPEC_HIDDEN; /* And the stubs */ extern HRESULT WINAPI IDirectInputDevice2AImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) DECLSPEC_HIDDEN; diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h index 6573de0..3c4776e 100644 --- a/dlls/dinput/dinput_private.h +++ b/dlls/dinput/dinput_private.h @@ -71,5 +71,6 @@ extern void _copy_diactionformatWtoA(LPDIACTIONFORMATA, LPDIACTIONFORMATW) DECLS #define DIKEYBOARD_MASK 0x81000000 #define DIMOUSE_MASK 0x82000000 +#define DIGENRE_ANY 0xFF000000 #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */ diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c index 68dcc6a..b5c028c 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c @@ -432,9 +432,47 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface, LPCWSTR lpszUserName, DWORD dwFlags) { + JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface); + int i, j, has_actions = 0; + DWORD object_types[] = { DIDFT_AXIS, DIDFT_BUTTON }; + DWORD type_map[] = { DIDFT_RELAXIS, DIDFT_PSHBUTTON }; + FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags); - return DI_NOEFFECT; + for (i=0; i < lpdiaf->dwNumActions; i++) + { + DWORD inst = (0x000000ff & (lpdiaf->rgoAction[i].dwSemantic)) - 1; + DWORD type = 0x000000ff & (lpdiaf->rgoAction[i].dwSemantic >> 8); + DWORD genre = 0xff000000 & lpdiaf->rgoAction[i].dwSemantic; + + /* Only consider actions of the right genre */ + if (lpdiaf->dwGenre != genre && genre != DIGENRE_ANY) continue; + + for (j=0; j < sizeof(object_types)/sizeof(object_types[0]); j++) + { + if (type & object_types[j]) + { + /* Assure that the object exists */ + LPDIOBJECTDATAFORMAT odf = dataformat_to_odf_by_type(This->base.data_format.wine_df, inst, DIDFT_BUTTON); + + if (odf != NULL) + { + lpdiaf->rgoAction[i].dwObjID = type_map[j] | (0x0000ff00 & (inst << 8)); + lpdiaf->rgoAction[i].guidInstance = This->base.guid; + lpdiaf->rgoAction[i].dwHow = DIAH_DEFAULT; + + has_actions = 1; + + /* No need to try other types if the action was already mapped */ + break; + } + } + } + } + + if (!has_actions) return DI_NOEFFECT; + + return IDirectInputDevice8WImpl_BuildActionMap(iface, lpdiaf, lpszUserName, dwFlags); } HRESULT WINAPI JoystickAGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8A iface,
1
0
0
0
Lucas Fialho Zawacki : dinput: EnumDevicesBySemantics enumerate joysticks with priority flags.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 6e098f90a6ec5bc9cec657996569ec2418d04ca8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e098f90a6ec5bc9cec657996…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Thu Jul 21 15:36:00 2011 -0300 dinput: EnumDevicesBySemantics enumerate joysticks with priority flags. --- dlls/dinput/dinput_main.c | 50 ++++++++++++++++++++++++++++++++------------ 1 files changed, 36 insertions(+), 14 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index b653307..37b4673 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -317,6 +317,38 @@ void _copy_diactionformatWtoA(LPDIACTIONFORMATA to, LPDIACTIONFORMATW from) } } +/* _diactionformat_priority + * + * Given a DIACTIONFORMAT structure and a DI genre, returns the enumeration + * priority. Joysticks should pass the game genre, and mouse or keyboard their + * respective DI*_MASK + */ +static DWORD _diactionformat_priorityA(LPDIACTIONFORMATA lpdiaf, DWORD genre) +{ + int i; + DWORD priorityFlags = 0; + + /* If there's at least one action for the device it's priority 1 */ + for(i=0; i < lpdiaf->dwActionSize; i++) + if ((lpdiaf->rgoAction[i].dwSemantic & genre) == genre) + priorityFlags |= DIEDBS_MAPPEDPRI1; + + return priorityFlags; +} + +static DWORD _diactionformat_priorityW(LPDIACTIONFORMATW lpdiaf, DWORD genre) +{ + int i; + DWORD priorityFlags = 0; + + /* If there's at least one action for the device it's priority 1 */ + for(i=0; i < lpdiaf->dwActionSize; i++) + if ((lpdiaf->rgoAction[i].dwSemantic & genre) == genre) + priorityFlags |= DIEDBS_MAPPEDPRI1; + + return priorityFlags; +} + /****************************************************************************** * IDirectInputA_EnumDevices */ @@ -877,7 +909,7 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics( { TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); - callbackFlags = 0; + callbackFlags = _diactionformat_priorityA(lpdiActionFormat, lpdiActionFormat->dwGenre); /* Default behavior is to enumerate attached game controllers */ enumSuccess = dinput_devices[i]->enum_deviceA(DI8DEVCLASS_GAMECTRL, DIEDFL_ATTACHEDONLY | dwFlags, &didevi, This->dwVersion, j); if (enumSuccess) @@ -895,16 +927,11 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics( /* Enumerate keyboard and mouse */ for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++) { - callbackFlags = 0; + callbackFlags = _diactionformat_priorityA(lpdiActionFormat, actionMasks[i]); IDirectInput_CreateDevice(iface, guids[i], &lpdid, NULL); IDirectInputDevice_GetDeviceInfo(lpdid, &didevi); - /* If there's at least one action for the device it's priority 1 */ - for(j=0; j < lpdiActionFormat->dwActionSize; j++) - if ((lpdiActionFormat->rgoAction[j].dwSemantic & actionMasks[i]) == actionMasks[i]) - callbackFlags |= DIEDBS_MAPPEDPRI1; - if (lpCallback(&didevi, lpdid, callbackFlags, sizeof(guids)/sizeof(guids[0]) - (i+1), pvRef) == DIENUM_STOP) return DI_OK; } @@ -942,7 +969,7 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics( { TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); - callbackFlags = 0; + callbackFlags = _diactionformat_priorityW(lpdiActionFormat, lpdiActionFormat->dwGenre); /* Default behavior is to enumerate attached game controllers */ enumSuccess = dinput_devices[i]->enum_deviceW(DI8DEVCLASS_GAMECTRL, DIEDFL_ATTACHEDONLY | dwFlags, &didevi, This->dwVersion, j); if (enumSuccess) @@ -960,16 +987,11 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics( /* Enumerate keyboard and mouse */ for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++) { - callbackFlags = 0; + callbackFlags = _diactionformat_priorityW(lpdiActionFormat, actionMasks[i]); IDirectInput_CreateDevice(iface, guids[i], &lpdid, NULL); IDirectInputDevice_GetDeviceInfo(lpdid, &didevi); - /* If there's at least one action for the device it's priority 1 */ - for(j=0; j < lpdiActionFormat->dwActionSize; j++) - if ((lpdiActionFormat->rgoAction[j].dwSemantic & actionMasks[i]) == actionMasks[i]) - callbackFlags |= DIEDBS_MAPPEDPRI1; - if (lpCallback(&didevi, lpdid, callbackFlags, sizeof(guids)/sizeof(guids[0]) - (i+1), pvRef) == DIENUM_STOP) return DI_OK; }
1
0
0
0
Jay Yang : comclt32: Ensure that item data is actually sent out with notifications.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: e98cef491cc9c0f4770e9610f887fe9a23e1dd9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e98cef491cc9c0f4770e9610f…
Author: Jay Yang <jkelleyy(a)gmail.com> Date: Thu Jul 21 22:59:43 2011 -0400 comclt32: Ensure that item data is actually sent out with notifications. --- dlls/comctl32/comboex.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 3402a71..d6b0d8c 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -672,6 +672,7 @@ static INT COMBOEX_InsertItemW (COMBOEX_INFO *infoPtr, COMBOBOXEXITEMW const *ci SendMessageW (infoPtr->hwndCombo, CB_INSERTSTRING, cit->iItem, (LPARAM)item); memset (&nmcit.ceItem, 0, sizeof(nmcit.ceItem)); + nmcit.ceItem.mask=~0; COMBOEX_CopyItem (item, &nmcit.ceItem); COMBOEX_NotifyItem (infoPtr, CBEN_INSERTITEM, &nmcit); @@ -1304,6 +1305,7 @@ static BOOL COMBOEX_WM_DeleteItem (COMBOEX_INFO *infoPtr, DELETEITEMSTRUCT const infoPtr->nb_items--; memset (&nmcit.ceItem, 0, sizeof(nmcit.ceItem)); + nmcit.ceItem.mask=~0; COMBOEX_CopyItem (olditem, &nmcit.ceItem); COMBOEX_NotifyItem (infoPtr, CBEN_DELETEITEM, &nmcit);
1
0
0
0
Jay Yang : explorer: Fix various memory leaks.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: dadcdb71b5591641420b9b9f7160a7ba075d5ae5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dadcdb71b5591641420b9b9f7…
Author: Jay Yang <jkelleyy(a)gmail.com> Date: Thu Jul 21 22:59:20 2011 -0400 explorer: Fix various memory leaks. --- programs/explorer/explorer.c | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index 1b3fa90..9ada5d2 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -62,8 +62,9 @@ typedef struct IExplorerBrowser *browser; HWND main_window,path_box; INT rebar_height; - LPCITEMIDLIST pidl; + LPITEMIDLIST pidl; IImageList *icon_list; + DWORD advise_cookie; } explorer_info; enum @@ -139,6 +140,7 @@ static BOOL create_combobox_item(IShellFolder *folder, LPCITEMIDLIST pidl, IImag &icon_index,&icon_flags); IExtractIconW_Extract(extract_icon,icon_file,icon_index,NULL,&icon,20); item->iImage = ImageList_AddIcon((HIMAGELIST)icon_list,icon); + IExtractIconW_Release(extract_icon); } else { @@ -179,12 +181,14 @@ static void update_path_box(explorer_info *info) if(SUCCEEDED(IShellFolder_EnumObjects(desktop,NULL,SHCONTF_FOLDERS,&ids)) && ids!=NULL) { - LPITEMIDLIST curr_pidl; + LPITEMIDLIST curr_pidl=NULL; HRESULT hres; item.iIndent = 1; while(1) { + ILFree(curr_pidl); + curr_pidl=NULL; hres = IEnumIDList_Next(ids,1,&curr_pidl,NULL); if(FAILED(hres) || hres == S_FALSE) break; @@ -245,6 +249,8 @@ static void update_path_box(explorer_info *info) CoTaskMemFree(item.pszText); } } + ILFree(curr_pidl); + IEnumIDList_Release(ids); } else WINE_WARN("Could not enumerate the desktop\n"); @@ -255,7 +261,8 @@ static void update_path_box(explorer_info *info) static HRESULT WINAPI IExplorerBrowserEventsImpl_fnOnNavigationComplete(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidl) { IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface); - This->info->pidl = pidl; + ILFree(This->info->pidl); + This->info->pidl = ILClone(pidl); update_path_box(This->info); return S_OK; } @@ -292,9 +299,9 @@ static IExplorerBrowserEvents *make_explorer_events(explorer_info *info) = HeapAlloc(GetProcessHeap(), 0, sizeof(IExplorerBrowserEventsImpl)); ret->IExplorerBrowserEvents_iface.lpVtbl = &vt_IExplorerBrowserEvents; ret->info = info; + ret->ref = 1; SHGetImageList(SHIL_SMALL,&IID_IImageList,(void**)&(ret->info->icon_list)); SendMessageW(info->path_box,CBEM_SETIMAGELIST,0,(LPARAM)ret->info->icon_list); - IExplorerBrowserEvents_AddRef(&ret->IExplorerBrowserEvents_iface); return &ret->IExplorerBrowserEvents_iface; } @@ -306,7 +313,6 @@ static void make_explorer_window(IShellFolder* startFolder) IExplorerBrowserEvents *events; explorer_info *info; HRESULT hres; - DWORD cookie; WCHAR explorer_title[100]; WCHAR pathbox_label[50]; TBADDBITMAP bitmap_info; @@ -318,7 +324,7 @@ static void make_explorer_window(IShellFolder* startFolder) sizeof(explorer_title)/sizeof(WCHAR)); LoadStringW(explorer_hInstance,IDS_PATHBOX_LABEL,pathbox_label, sizeof(pathbox_label)/sizeof(WCHAR)); - info = HeapAlloc(GetProcessHeap(),0,sizeof(explorer_info)); + info = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(explorer_info)); if(!info) { WINE_ERR("Could not allocate a explorer_info struct\n"); @@ -402,7 +408,7 @@ static void make_explorer_window(IShellFolder* startFolder) band_info.hwndChild=info->path_box; SendMessageW(rebar,RB_INSERTBANDW,-1,(LPARAM)&band_info); events = make_explorer_events(info); - IExplorerBrowser_Advise(info->browser,events,&cookie); + IExplorerBrowser_Advise(info->browser,events,&info->advise_cookie); IExplorerBrowser_BrowseToObject(info->browser,(IUnknown*)startFolder, SBSP_ABSOLUTE); ShowWindow(info->main_window,SW_SHOWDEFAULT); @@ -532,8 +538,13 @@ static LRESULT CALLBACK explorer_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, L switch(uMsg) { case WM_DESTROY: + IExplorerBrowser_Unadvise(browser,info->advise_cookie); + IExplorerBrowser_Destroy(browser); IExplorerBrowser_Release(browser); + ILFree(info->pidl); + IImageList_Release(info->icon_list); HeapFree(GetProcessHeap(),0,info); + SetWindowLongPtrW(hwnd,EXPLORER_INFO_INDEX,0); PostQuitMessage(0); break; case WM_QUIT:
1
0
0
0
André Hentschel : user32/tests: Fix two typos.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 54ca4034cff3889ae1997ec1332486d7660bd5c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=54ca4034cff3889ae1997ec13…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Thu Jul 21 20:27:14 2011 +0200 user32/tests: Fix two typos. --- dlls/user32/tests/dialog.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 5964931..1a1cd75 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -642,7 +642,7 @@ static void test_WM_NEXTDLGCTL(void) "Button1 style not set to BS_DEFPUSHBUTTON\n" ); ok ( !((GetWindowLong( g_hwndTestDlgBut2, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button2's style not chaged to BS_PUSHBUTTON\n" ); + "Button2's style not changed to BS_PUSHBUTTON\n" ); } /* @@ -667,7 +667,7 @@ static void test_WM_NEXTDLGCTL(void) "Button2 style not set to BS_DEFPUSHBUTTON\n" ); ok ( !((GetWindowLong( g_hwndTestDlgBut1, GWL_STYLE)) & BS_DEFPUSHBUTTON), - "Button1's style not chaged to BS_PUSHBUTTON\n" ); + "Button1's style not changed to BS_PUSHBUTTON\n" ); } /*
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
84
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
Results per page:
10
25
50
100
200