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
June 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
809 discussions
Start a n
N
ew thread
Damjan Jovanovic : rpcrt4: Implement RpcNetworkInqProtseqs.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: ec2f51369092c5bce9093a0f8dc342d4889896f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec2f51369092c5bce9093a0f8…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Thu Jun 23 07:15:40 2011 +0200 rpcrt4: Implement RpcNetworkInqProtseqs. --- dlls/rpcrt4/rpc_server.c | 18 ------------ dlls/rpcrt4/rpc_transport.c | 65 +++++++++++++++++++++++++++++++++++++++++++ include/rpcdce.h | 6 ++++ 3 files changed, 71 insertions(+), 18 deletions(-) diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 3a9ecf8..9fd4cf6 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -825,24 +825,6 @@ static RPC_STATUS RPCRT4_use_protseq(RpcServerProtseq* ps, const char *endpoint) } /*********************************************************************** - * RpcNetworkInqProtseqsA (RPCRT4.@) - */ -RPC_STATUS WINAPI RpcNetworkInqProtseqsA( RPC_PROTSEQ_VECTORA* ProtSeqVector ) -{ - FIXME("(%p): stub\n", ProtSeqVector); - return RPC_S_NO_PROTSEQS_REGISTERED; -} - -/*********************************************************************** - * RpcNetworkInqProtseqsW (RPCRT4.@) - */ -RPC_STATUS WINAPI RpcNetworkInqProtseqsW( RPC_PROTSEQ_VECTORW* ProtSeqVector ) -{ - FIXME("(%p): stub\n", ProtSeqVector); - return RPC_S_NO_PROTSEQS_REGISTERED; -} - -/*********************************************************************** * RpcServerInqBindings (RPCRT4.@) */ RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector ) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 0ba9720..467c305 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -3160,3 +3160,68 @@ RPC_STATUS WINAPI RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW **protseqs) } return RPC_S_OK; } + +/*********************************************************************** + * RpcNetworkInqProtseqsW (RPCRT4.@) + */ +RPC_STATUS WINAPI RpcNetworkInqProtseqsW( RPC_PROTSEQ_VECTORW** protseqs ) +{ + RPC_PROTSEQ_VECTORW *pvector; + int i = 0; + RPC_STATUS status = RPC_S_OUT_OF_MEMORY; + + TRACE("(%p)\n", protseqs); + + *protseqs = HeapAlloc(GetProcessHeap(), 0, sizeof(RPC_PROTSEQ_VECTORW)+(sizeof(unsigned short*)*ARRAYSIZE(protseq_list))); + if (!*protseqs) + goto end; + pvector = *protseqs; + pvector->Count = 0; + for (i = 0; i < ARRAYSIZE(protseq_list); i++) + { + pvector->Protseq[i] = HeapAlloc(GetProcessHeap(), 0, (strlen(protseq_list[i].name)+1)*sizeof(unsigned short)); + if (pvector->Protseq[i] == NULL) + goto end; + MultiByteToWideChar(CP_ACP, 0, (CHAR*)protseq_list[i].name, -1, + (WCHAR*)pvector->Protseq[i], strlen(protseq_list[i].name) + 1); + pvector->Count++; + } + status = RPC_S_OK; + +end: + if (status != RPC_S_OK) + RpcProtseqVectorFreeW(protseqs); + return status; +} + +/*********************************************************************** + * RpcNetworkInqProtseqsA (RPCRT4.@) + */ +RPC_STATUS WINAPI RpcNetworkInqProtseqsA(RPC_PROTSEQ_VECTORA** protseqs) +{ + RPC_PROTSEQ_VECTORA *pvector; + int i = 0; + RPC_STATUS status = RPC_S_OUT_OF_MEMORY; + + TRACE("(%p)\n", protseqs); + + *protseqs = HeapAlloc(GetProcessHeap(), 0, sizeof(RPC_PROTSEQ_VECTORW)+(sizeof(unsigned char*)*ARRAYSIZE(protseq_list))); + if (!*protseqs) + goto end; + pvector = *protseqs; + pvector->Count = 0; + for (i = 0; i < ARRAYSIZE(protseq_list); i++) + { + pvector->Protseq[i] = HeapAlloc(GetProcessHeap(), 0, strlen(protseq_list[i].name)+1); + if (pvector->Protseq[i] == NULL) + goto end; + strcpy((char*)pvector->Protseq[i], protseq_list[i].name); + pvector->Count++; + } + status = RPC_S_OK; + +end: + if (status != RPC_S_OK) + RpcProtseqVectorFreeA(protseqs); + return status; +} diff --git a/include/rpcdce.h b/include/rpcdce.h index 76994df..bbdc42f 100644 --- a/include/rpcdce.h +++ b/include/rpcdce.h @@ -562,6 +562,12 @@ RPCRTAPI RPC_STATUS RPC_ENTRY #define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid) RPCRTAPI RPC_STATUS RPC_ENTRY + RpcNetworkInqProtseqsA( RPC_PROTSEQ_VECTORA** protseqs ); +RPCRTAPI RPC_STATUS RPC_ENTRY + RpcNetworkInqProtseqsW( RPC_PROTSEQ_VECTORW** protseqs ); +#define RpcNetworkInqProtseqs WINELIB_NAME_AW(RpcNetworkInqProtseqs) + +RPCRTAPI RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeA( RPC_PROTSEQ_VECTORA** protseqs ); RPCRTAPI RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeW( RPC_PROTSEQ_VECTORW** protseqs );
1
0
0
0
Lucas Fialho Zawacki : dinput: SetActionMap setting the device buffer.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: 2fe9f14b294e57bdbb676d452cb63e98d7ecc45b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2fe9f14b294e57bdbb676d452…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Tue Jun 28 13:55:24 2011 -0300 dinput: SetActionMap setting the device buffer. --- dlls/dinput/device.c | 35 +++++++++++++++++++++++---- dlls/dinput/dinput_main.c | 54 ++++++++++++++++++++++++++++++++++++++++++ dlls/dinput/dinput_private.h | 2 + dlls/dinput8/tests/device.c | 2 +- 4 files changed, 87 insertions(+), 6 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 397e70e..5a03a27 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -1391,9 +1391,20 @@ HRESULT WINAPI IDirectInputDevice8AImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface LPCSTR lpszUserName, DWORD dwFlags) { - FIXME("(%p)->(%p,%s,%08x): stub !\n", iface, lpdiaf, lpszUserName, dwFlags); - - return DI_OK; + IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8A(iface); + DIACTIONFORMATW diafW; + HRESULT hr; + + FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, lpszUserName, dwFlags); + + diafW.rgoAction = HeapAlloc(GetProcessHeap(), 0, sizeof(DIACTIONW)*lpdiaf->dwNumActions); + _copy_diactionformatAtoW(&diafW, lpdiaf); + + hr = IDirectInputDevice8WImpl_SetActionMap(&This->IDirectInputDevice8W_iface, &diafW, NULL, dwFlags); + + HeapFree(GetProcessHeap(), 0, diafW.rgoAction); + + return hr; } HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, @@ -1401,8 +1412,22 @@ HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface LPCWSTR lpszUserName, DWORD dwFlags) { - FIXME("(%p)->(%p,%s,%08x): stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags); - + IDirectInputDeviceImpl *This = impl_from_IDirectInputDevice8W(iface); + DIPROPDWORD dp; + + FIXME("(%p)->(%p,%s,%08x): semi-stub !\n", iface, lpdiaf, debugstr_w(lpszUserName), dwFlags); + + if (This->acquired) return DIERR_ACQUIRED; + + if (lpdiaf->dwBufferSize > 0) + { + dp.diph.dwSize = sizeof(DIPROPDWORD); + dp.dwData = lpdiaf->dwBufferSize; + dp.diph.dwHeaderSize = sizeof(DIPROPHEADER); + dp.diph.dwHow = DIPH_DEVICE; + IDirectInputDevice8_SetProperty(iface, DIPROP_BUFFERSIZE, &dp.diph); + } + return DI_OK; } diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index c032642..1329ec6 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -254,6 +254,60 @@ void _dump_diactionformatA(LPDIACTIONFORMATA lpdiActionFormat) { } } +void _copy_diactionformatAtoW(LPDIACTIONFORMATW to, LPDIACTIONFORMATA from) +{ + int i; + + to->dwSize = sizeof(DIACTIONFORMATW); + to->dwActionSize = sizeof(DIACTIONW); + to->dwDataSize = from->dwDataSize; + to->dwNumActions = from->dwNumActions; + to->guidActionMap = from->guidActionMap; + to->dwGenre = from->dwGenre; + to->dwBufferSize = from->dwBufferSize; + to->lAxisMin = from->lAxisMin; + to->lAxisMax = from->lAxisMax; + to->dwCRC = from->dwCRC; + to->ftTimeStamp = from->ftTimeStamp; + + for (i=0; i < to->dwNumActions; i++) + { + to->rgoAction[i].uAppData = from->rgoAction[i].uAppData; + to->rgoAction[i].dwSemantic = from->rgoAction[i].dwSemantic; + to->rgoAction[i].dwFlags = from->rgoAction[i].dwFlags; + to->rgoAction[i].guidInstance = from->rgoAction[i].guidInstance; + to->rgoAction[i].dwObjID = from->rgoAction[i].dwObjID; + to->rgoAction[i].dwHow = from->rgoAction[i].dwHow; + } +} + +void _copy_diactionformatWtoA(LPDIACTIONFORMATA to, LPDIACTIONFORMATW from) +{ + int i; + + to->dwSize = sizeof(DIACTIONFORMATA); + to->dwActionSize = sizeof(DIACTIONA); + to->dwDataSize = from->dwDataSize; + to->dwNumActions = from->dwNumActions; + to->guidActionMap = from->guidActionMap; + to->dwGenre = from->dwGenre; + to->dwBufferSize = from->dwBufferSize; + to->lAxisMin = from->lAxisMin; + to->lAxisMax = from->lAxisMax; + to->dwCRC = from->dwCRC; + to->ftTimeStamp = from->ftTimeStamp; + + for (i=0; i < to->dwNumActions; i++) + { + to->rgoAction[i].uAppData = from->rgoAction[i].uAppData; + to->rgoAction[i].dwSemantic = from->rgoAction[i].dwSemantic; + to->rgoAction[i].dwFlags = from->rgoAction[i].dwFlags; + to->rgoAction[i].guidInstance = from->rgoAction[i].guidInstance; + to->rgoAction[i].dwObjID = from->rgoAction[i].dwObjID; + to->rgoAction[i].dwHow = from->rgoAction[i].dwHow; + } +} + /****************************************************************************** * IDirectInputA_EnumDevices */ diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h index 33cc823..a6ce4d6 100644 --- a/dlls/dinput/dinput_private.h +++ b/dlls/dinput/dinput_private.h @@ -63,6 +63,8 @@ extern void check_dinput_hooks(LPDIRECTINPUTDEVICE8W) DECLSPEC_HIDDEN; typedef int (*DI_EVENT_PROC)(LPDIRECTINPUTDEVICE8A, WPARAM, LPARAM); extern void _dump_diactionformatA(LPDIACTIONFORMATA) DECLSPEC_HIDDEN; +extern void _copy_diactionformatAtoW(LPDIACTIONFORMATW, LPDIACTIONFORMATA) DECLSPEC_HIDDEN; +extern void _copy_diactionformatWtoA(LPDIACTIONFORMATA, LPDIACTIONFORMATW) DECLSPEC_HIDDEN; #define IS_DIPROP(x) (((ULONG_PTR)(x) >> 16) == 0) diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c index af14d60..4841a1f 100644 --- a/dlls/dinput8/tests/device.c +++ b/dlls/dinput8/tests/device.c @@ -165,7 +165,7 @@ static BOOL CALLBACK enumeration_callback( hr = IDirectInputDevice_GetProperty(lpdid, DIPROP_BUFFERSIZE, &dp.diph); ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr); - todo_wine ok (dp.dwData == data->lpdiaf->dwBufferSize, "SetActionMap must set the buffer, buffersize=%d\n", dp.dwData); + ok (dp.dwData == data->lpdiaf->dwBufferSize, "SetActionMap must set the buffer, buffersize=%d\n", dp.dwData); /* SetActionMap has set the data format so now it should work */ hr = IDirectInputDevice8_Acquire(lpdid);
1
0
0
0
Lucas Fialho Zawacki : dinput8/tests: Testing BuildActionMap and SetActionMap with keyboard input.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: 636cc9acff29666ebf7f1d0043db49c37518c7fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=636cc9acff29666ebf7f1d004…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Tue Jun 28 13:54:49 2011 -0300 dinput8/tests: Testing BuildActionMap and SetActionMap with keyboard input. --- dlls/dinput8/tests/device.c | 119 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 119 insertions(+), 0 deletions(-) diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c index 8344486..af14d60 100644 --- a/dlls/dinput8/tests/device.c +++ b/dlls/dinput8/tests/device.c @@ -38,6 +38,13 @@ struct enum_data { /* Dummy GUID */ static const GUID ACTION_MAPPING_GUID = { 0x1, 0x2, 0x3, { 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb } }; +enum { + DITEST_AXIS, + DITEST_BUTTON, + DITEST_KEYBOARDSPACE, + DITEST_MOUSEBUTTON0, +}; + static DIACTION actionMapping[]= { /* axis */ @@ -50,6 +57,63 @@ static DIACTION actionMapping[]= { 3, DIMOUSE_BUTTON0 , 0, { "Select" } } }; +static void test_keyboard_input( + LPDIRECTINPUTDEVICE8 lpdid, + DWORD key, + DWORD expected +) +{ + HRESULT hr; + DIDEVICEOBJECTDATA obj_data; + DWORD data_size = 1; + + hr = IDirectInputDevice8_Acquire(lpdid); + todo_wine ok (SUCCEEDED(hr), "Failed to acquire device hr=%08x\n", hr); + + keybd_event( key, 0, 0, 0); + + IDirectInputDevice8_Poll(lpdid); + hr = IDirectInputDevice8_GetDeviceData(lpdid, sizeof(obj_data), &obj_data, &data_size, 0); + + if (data_size != 1) + { + win_skip("We're not able to inject input into Windows dinput8 with events\n"); + return; + } + + ok (data_size == 1, "GetDeviceData did not read any event\n"); + todo_wine ok (obj_data.uAppData == expected, "Retrieval of action failed uAppData=%lu expected=%d\n", obj_data.uAppData, expected); +} + +static void test_build_action_map( + LPDIRECTINPUTDEVICE8 lpdid, + LPDIACTIONFORMAT lpdiaf, + int action_index, + DWORD obj_expected +) +{ + HRESULT hr; + DIACTION *actions; + DWORD obj_instance, how; + GUID assigned_to; + DIDEVICEINSTANCEA ddi; + + ddi.dwSize = sizeof(ddi); + IDirectInputDevice_GetDeviceInfo(lpdid, &ddi); + + hr = IDirectInputDevice8_BuildActionMap(lpdid, lpdiaf, NULL, DIDBAM_INITIALIZE); + ok (SUCCEEDED(hr), "BuildActionMap failed hr=%08x\n", hr); + + actions = lpdiaf->rgoAction; + obj_instance = DIDFT_GETINSTANCE(actions[action_index].dwObjID); + how = actions[action_index].dwHow; + assigned_to = actions[action_index].guidInstance; + + todo_wine ok (how == DIAH_USERCONFIG || how == DIAH_DEFAULT, "Action was not set dwHow=%08x\n", how); + todo_wine ok (obj_instance == obj_expected, "Action not mapped correctly instance=%08x expected=%08x\n", obj_instance, obj_expected); + todo_wine ok (IsEqualGUID(&assigned_to, &ddi.guidInstance), "Action and device GUID do not match action=%d\n", action_index); +} + static BOOL CALLBACK enumeration_callback( LPCDIDEVICEINSTANCE lpddi, LPDIRECTINPUTDEVICE8 lpdid, @@ -57,6 +121,8 @@ static BOOL CALLBACK enumeration_callback( DWORD dwRemaining, LPVOID pvRef) { + HRESULT hr; + DIPROPDWORD dp; struct enum_data *data = pvRef; if (!data) return DIENUM_CONTINUE; @@ -79,6 +145,36 @@ static BOOL CALLBACK enumeration_callback( ok (dwFlags & DIEDBS_MAPPEDPRI1, "Mouse should be mapped as pri1 dwFlags=%08x\n", dwFlags); } + /* Building and setting an action map */ + /* It should not use any pre-stored mappings so we use DIDBAM_INITIALIZE */ + hr = IDirectInputDevice8_BuildActionMap(lpdid, data->lpdiaf, NULL, DIDBAM_INITIALIZE); + ok (SUCCEEDED(hr), "BuildActionMap failed hr=%08x\n", hr); + + /* Device has no data format and thus can't be acquired */ + hr = IDirectInputDevice8_Acquire(lpdid); + ok (hr == DIERR_INVALIDPARAM, "Device was acquired before SetActionMap hr=%08x\n", hr); + + hr = IDirectInputDevice8_SetActionMap(lpdid, data->lpdiaf, NULL, 0); + ok (SUCCEEDED(hr), "SetActionMap failed hr=%08x\n", hr); + + /* Test buffer size */ + memset(&dp, 0, sizeof(dp)); + dp.diph.dwSize = sizeof(dp); + dp.diph.dwHeaderSize = sizeof(DIPROPHEADER); + dp.diph.dwHow = DIPH_DEVICE; + + hr = IDirectInputDevice_GetProperty(lpdid, DIPROP_BUFFERSIZE, &dp.diph); + ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr); + todo_wine ok (dp.dwData == data->lpdiaf->dwBufferSize, "SetActionMap must set the buffer, buffersize=%d\n", dp.dwData); + + /* SetActionMap has set the data format so now it should work */ + hr = IDirectInputDevice8_Acquire(lpdid); + todo_wine ok (SUCCEEDED(hr), "Acquire failed hr=%08x\n", hr); + + /* SetActionMap should not work on an acquired device */ + hr = IDirectInputDevice8_SetActionMap(lpdid, data->lpdiaf, NULL, 0); + todo_wine ok (hr == DIERR_ACQUIRED, "SetActionMap succeeded with an acquired device hr=%08x\n", hr); + return DIENUM_CONTINUE; } @@ -119,6 +215,7 @@ static void test_action_mapping(void) af.rgoAction = actionMapping; af.guidActionMap = ACTION_MAPPING_GUID; af.dwGenre = 0x01000000; /* DIVIRTUAL_DRIVING_RACE */ + af.dwBufferSize = 32; hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, enumeration_callback, &data, 0); ok (SUCCEEDED(hr), "EnumDevicesBySemantics failed: hr=%08x\n", hr); @@ -126,6 +223,28 @@ static void test_action_mapping(void) ok (data.keyboard != NULL, "EnumDevicesBySemantics should enumerate the keyboard\n"); ok (data.mouse != NULL, "EnumDevicesBySemantics should enumerate the mouse\n"); + if (data.keyboard != NULL) + { + /* Test keyboard BuildActionMap */ + test_build_action_map(data.keyboard, data.lpdiaf, DITEST_KEYBOARDSPACE, DIK_SPACE); + /* Test keyboard input */ + test_keyboard_input(data.keyboard, VK_SPACE, 2); + + /* Test BuildActionMap with no suitable actions for a device */ + IDirectInputDevice_Unacquire(data.keyboard); + af.dwDataSize = 4 * DITEST_KEYBOARDSPACE; + af.dwNumActions = DITEST_KEYBOARDSPACE; + + hr = IDirectInputDevice8_BuildActionMap(data.keyboard, data.lpdiaf, NULL, DIDBAM_INITIALIZE); + todo_wine ok (hr == DI_NOEFFECT, "BuildActionMap should have no effect with no actions hr=%08x\n", hr); + + hr = IDirectInputDevice8_SetActionMap(data.keyboard, data.lpdiaf, NULL, 0); + todo_wine ok (hr == DI_NOEFFECT, "SetActionMap should have no effect with no actions to map hr=%08x\n", hr); + + af.dwDataSize = 4 * sizeof(actionMapping) / sizeof(actionMapping[0]); + af.dwNumActions = sizeof(actionMapping) / sizeof(actionMapping[0]); + } + /* The call fails with a zeroed GUID */ memset(&af.guidActionMap, 0, sizeof(GUID)); hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, enumeration_callback, 0, 0);
1
0
0
0
Lucas Fialho Zawacki : dinput: EnumDevicesBySemantics enumerating keyboard and mouse with priority flags.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: 0f17c828f7381ddd606e17347a7ee32347c167fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f17c828f7381ddd606e17347…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Tue Jun 28 13:54:36 2011 -0300 dinput: EnumDevicesBySemantics enumerating keyboard and mouse with priority flags. --- dlls/dinput/dinput_main.c | 73 +++++++++++++++++++++++++++++++++++++++--- dlls/dinput/dinput_private.h | 3 ++ dlls/dinput8/tests/device.c | 10 +++--- 3 files changed, 76 insertions(+), 10 deletions(-) diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index d3727bc..c032642 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -681,8 +681,13 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics( ) { IDirectInputImpl *This = impl_from_IDirectInput8A( iface ); + DIDEVICEINSTANCEA didevi; + LPDIRECTINPUTDEVICE8A lpdid; + BOOL ret; + DWORD callbackFlags = 0; + int i; - FIXME("(this=%p,%s,%p,%p,%p,%04x): stub\n", This, ptszUserName, lpdiActionFormat, + FIXME("(this=%p,%s,%p,%p,%p,%04x): semi-stub\n", This, ptszUserName, lpdiActionFormat, lpCallback, pvRef, dwFlags); #define X(x) if (dwFlags & x) FIXME("\tdwFlags |= "#x"\n"); X(DIEDBSFL_ATTACHEDONLY) @@ -695,6 +700,32 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics( _dump_diactionformatA(lpdiActionFormat); + didevi.dwSize = sizeof(didevi); + + /* enum the keyboard first */ + IDirectInput_CreateDevice(iface, &GUID_SysKeyboard, &lpdid, NULL); + IDirectInputDevice_GetDeviceInfo(lpdid, &didevi); + /* if there's any DIKEYBOARD action, keyboard is priority 1*/ + for(i=0; i < lpdiActionFormat->dwActionSize; i++) + if ((lpdiActionFormat->rgoAction[i].dwSemantic & DIKEYBOARD_MASK) == DIKEYBOARD_MASK) + callbackFlags |= DIEDBS_MAPPEDPRI1; + + ret = lpCallback(&didevi, lpdid, callbackFlags, 1, pvRef); + + if (ret == DIENUM_STOP) return DI_OK; + + callbackFlags = 0; + + /* and then the mouse */ + IDirectInput_CreateDevice(iface, &GUID_SysMouse, &lpdid, NULL); + IDirectInputDevice_GetDeviceInfo(lpdid, &didevi); + /* same as above, but for the mouse */ + for(i=0; i < lpdiActionFormat->dwActionSize; i++) + if ((lpdiActionFormat->rgoAction[i].dwSemantic & DIMOUSE_MASK) == DIMOUSE_MASK) + callbackFlags |= DIEDBS_MAPPEDPRI1; + + lpCallback(&didevi, lpdid, callbackFlags, 0, pvRef); + return DI_OK; } @@ -704,11 +735,43 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics( LPVOID pvRef, DWORD dwFlags ) { - IDirectInputImpl *This = impl_from_IDirectInput8W( iface ); + IDirectInputImpl *This = impl_from_IDirectInput8W(iface); + DIDEVICEINSTANCEW didevi; + LPDIRECTINPUTDEVICE8W lpdid; + BOOL ret; + DWORD callbackFlags = 0; + int i; - FIXME("(this=%p,%s,%p,%p,%p,%04x): stub\n", This, debugstr_w(ptszUserName), lpdiActionFormat, - lpCallback, pvRef, dwFlags); - return 0; + FIXME("(this=%p,%s,%p,%p,%p,%04x): semi-stub\n", This, debugstr_w(ptszUserName), lpdiActionFormat, + lpCallback, pvRef, dwFlags); + + didevi.dwSize = sizeof(didevi); + + /* enum the keyboard first */ + IDirectInput_CreateDevice(iface, &GUID_SysKeyboard, &lpdid, NULL); + IDirectInputDevice_GetDeviceInfo(lpdid, &didevi); + /* if there's any DIKEYBOARD action, keyboard is priority 1*/ + for(i=0; i < lpdiActionFormat->dwActionSize; i++) + if ((lpdiActionFormat->rgoAction[i].dwSemantic & DIKEYBOARD_MASK) == DIKEYBOARD_MASK) + callbackFlags |= DIEDBS_MAPPEDPRI1; + + ret = lpCallback(&didevi, lpdid, callbackFlags, 1, pvRef); + + if (ret == DIENUM_STOP) return DI_OK; + + callbackFlags = 0; + + /* and then the mouse */ + IDirectInput_CreateDevice(iface, &GUID_SysMouse, &lpdid, NULL); + IDirectInputDevice_GetDeviceInfo(lpdid, &didevi); + /* same as above, but for the mouse */ + for(i=0; i < lpdiActionFormat->dwActionSize; i++) + if ((lpdiActionFormat->rgoAction[i].dwSemantic & DIMOUSE_MASK) == DIMOUSE_MASK) + callbackFlags |= DIEDBS_MAPPEDPRI1; + + lpCallback(&didevi, lpdid, callbackFlags, 0, pvRef); + + return DI_OK; } static HRESULT WINAPI IDirectInput8AImpl_ConfigureDevices( diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h index 5972081..33cc823 100644 --- a/dlls/dinput/dinput_private.h +++ b/dlls/dinput/dinput_private.h @@ -66,4 +66,7 @@ extern void _dump_diactionformatA(LPDIACTIONFORMATA) DECLSPEC_HIDDEN; #define IS_DIPROP(x) (((ULONG_PTR)(x) >> 16) == 0) +#define DIKEYBOARD_MASK 0x81000000 +#define DIMOUSE_MASK 0x82000000 + #endif /* __WINE_DLLS_DINPUT_DINPUT_PRIVATE_H */ diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c index 992821d..8344486 100644 --- a/dlls/dinput8/tests/device.c +++ b/dlls/dinput8/tests/device.c @@ -68,7 +68,7 @@ static BOOL CALLBACK enumeration_callback( IDirectInputDevice_AddRef(lpdid); data->keyboard = lpdid; - todo_wine ok (dwFlags & DIEDBS_MAPPEDPRI1, "Keyboard should be mapped as pri1 dwFlags=%08x\n", dwFlags); + ok (dwFlags & DIEDBS_MAPPEDPRI1, "Keyboard should be mapped as pri1 dwFlags=%08x\n", dwFlags); } if (IsEqualGUID(&lpddi->guidInstance, &GUID_SysMouse)) @@ -76,7 +76,7 @@ static BOOL CALLBACK enumeration_callback( IDirectInputDevice_AddRef(lpdid); data->mouse = lpdid; - todo_wine ok (dwFlags & DIEDBS_MAPPEDPRI1, "Mouse should be mapped as pri1 dwFlags=%08x\n", dwFlags); + ok (dwFlags & DIEDBS_MAPPEDPRI1, "Mouse should be mapped as pri1 dwFlags=%08x\n", dwFlags); } return DIENUM_CONTINUE; @@ -122,9 +122,9 @@ static void test_action_mapping(void) hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, enumeration_callback, &data, 0); ok (SUCCEEDED(hr), "EnumDevicesBySemantics failed: hr=%08x\n", hr); - todo_wine ok (data.ndevices > 0, "EnumDevicesBySemantics did not call the callback hr=%08x\n", hr); - todo_wine ok (data.keyboard != NULL, "EnumDevicesBySemantics should enumerate the keyboard\n"); - todo_wine ok (data.mouse != NULL, "EnumDevicesBySemantics should enumerate the mouse\n"); + ok (data.ndevices > 0, "EnumDevicesBySemantics did not call the callback hr=%08x\n", hr); + ok (data.keyboard != NULL, "EnumDevicesBySemantics should enumerate the keyboard\n"); + ok (data.mouse != NULL, "EnumDevicesBySemantics should enumerate the mouse\n"); /* The call fails with a zeroed GUID */ memset(&af.guidActionMap, 0, sizeof(GUID));
1
0
0
0
Lucas Fialho Zawacki : dinput8/tests: Test EnumDevicesBySemantics mouse and keyboard enumeration with flags.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: 3ed476caac4d9762b9db66267d95161ac7a7266d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3ed476caac4d9762b9db66267…
Author: Lucas Fialho Zawacki <lfzawacki(a)gmail.com> Date: Tue Jun 28 13:54:20 2011 -0300 dinput8/tests: Test EnumDevicesBySemantics mouse and keyboard enumeration with flags. --- dlls/dinput8/tests/device.c | 73 +++++++++++++++++++++++++++++++------------ 1 files changed, 53 insertions(+), 20 deletions(-) diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c index c18a83a..992821d 100644 --- a/dlls/dinput8/tests/device.c +++ b/dlls/dinput8/tests/device.c @@ -27,13 +27,58 @@ #include "initguid.h" #include "dinput.h" -static BOOL CALLBACK enum_by_semantics( +struct enum_data { + LPDIRECTINPUT8 pDI; + LPDIACTIONFORMAT lpdiaf; + LPDIRECTINPUTDEVICE8 keyboard; + LPDIRECTINPUTDEVICE8 mouse; + int ndevices; +}; + +/* Dummy GUID */ +static const GUID ACTION_MAPPING_GUID = { 0x1, 0x2, 0x3, { 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb } }; + +static DIACTION actionMapping[]= +{ + /* axis */ + { 0, 0x01008A01 /* DIAXIS_DRIVINGR_STEER */ , 0, { "Steer" } }, + /* button */ + { 1, 0x01000C01 /* DIBUTTON_DRIVINGR_SHIFTUP */ , 0, { "Upshift" } }, + /* keyboard key */ + { 2, DIKEYBOARD_SPACE , 0, { "Missile" } }, + /* mouse button */ + { 3, DIMOUSE_BUTTON0 , 0, { "Select" } } +}; + +static BOOL CALLBACK enumeration_callback( LPCDIDEVICEINSTANCE lpddi, LPDIRECTINPUTDEVICE8 lpdid, DWORD dwFlags, DWORD dwRemaining, LPVOID pvRef) { + struct enum_data *data = pvRef; + if (!data) return DIENUM_CONTINUE; + + data->ndevices++; + + /* collect the mouse and keyboard */ + if (IsEqualGUID(&lpddi->guidInstance, &GUID_SysKeyboard)) + { + IDirectInputDevice_AddRef(lpdid); + data->keyboard = lpdid; + + todo_wine ok (dwFlags & DIEDBS_MAPPEDPRI1, "Keyboard should be mapped as pri1 dwFlags=%08x\n", dwFlags); + } + + if (IsEqualGUID(&lpddi->guidInstance, &GUID_SysMouse)) + { + IDirectInputDevice_AddRef(lpdid); + data->mouse = lpdid; + + todo_wine ok (dwFlags & DIEDBS_MAPPEDPRI1, "Mouse should be mapped as pri1 dwFlags=%08x\n", dwFlags); + } + return DIENUM_CONTINUE; } @@ -44,17 +89,7 @@ static void test_action_mapping(void) HINSTANCE hinst = GetModuleHandle(NULL); LPDIRECTINPUT8 pDI = NULL; DIACTIONFORMAT af; - /* Dummy GUID */ - const GUID ACTION_MAPPING_GUID = { 0x1, 0x2, 0x3, { 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb } }; - - DIACTION actionMapping[]= - { - /* axis */ - { 0, 0x01008A01 /* DIAXIS_DRIVINGR_STEER */ , 0, { "Steer" } }, - - /* button */ - { 1, 0x01000C01 /* DIBUTTON_DRIVINGR_SHIFTUP */ , 0, { "Upshift" } } - }; + struct enum_data data = {pDI, &af, NULL, NULL, 0}; hr = CoCreateInstance(&CLSID_DirectInput8, 0, 1, &IID_IDirectInput8A, (LPVOID*)&pDI); if (hr == DIERR_OLDDIRECTINPUTVERSION || @@ -85,18 +120,16 @@ static void test_action_mapping(void) af.guidActionMap = ACTION_MAPPING_GUID; af.dwGenre = 0x01000000; /* DIVIRTUAL_DRIVING_RACE */ - hr = IDirectInput8_EnumDevicesBySemantics(pDI,0, &af, - enum_by_semantics, 0, 0); - - ok(SUCCEEDED(hr), "EnumDevicesBySemantics failed: hr=%08x\n",hr); + hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, enumeration_callback, &data, 0); + ok (SUCCEEDED(hr), "EnumDevicesBySemantics failed: hr=%08x\n", hr); + todo_wine ok (data.ndevices > 0, "EnumDevicesBySemantics did not call the callback hr=%08x\n", hr); + todo_wine ok (data.keyboard != NULL, "EnumDevicesBySemantics should enumerate the keyboard\n"); + todo_wine ok (data.mouse != NULL, "EnumDevicesBySemantics should enumerate the mouse\n"); /* The call fails with a zeroed GUID */ memset(&af.guidActionMap, 0, sizeof(GUID)); - hr = IDirectInput8_EnumDevicesBySemantics(pDI,0, &af, - enum_by_semantics, 0, 0); - + hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, enumeration_callback, 0, 0); todo_wine ok(FAILED(hr), "EnumDevicesBySemantics succeeded with invalid GUID hr=%08x\n", hr); - } START_TEST(device)
1
0
0
0
Michał Ziętek : wscript: Implemented Host_get_Version.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: 41eedc6d0ba8a23b8d1d82c381b5e89077bfc899 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41eedc6d0ba8a23b8d1d82c38…
Author: Michał Ziętek <smierc.w.wenecji(a)gmail.com> Date: Tue Jun 28 13:38:56 2011 +0200 wscript: Implemented Host_get_Version. --- programs/wscript/host.c | 8 ++++++-- programs/wscript/tests/run.js | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 3021656..f6dfaa0 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -30,6 +30,7 @@ #include <wine/debug.h> static const WCHAR wshNameW[] = {'W','i','n','d','o','w','s',' ','S','c','r','i','p','t',' ','H','o','s','t',0}; +static const WCHAR wshVersionW[] = {'5','.','8'}; WINE_DEFAULT_DEBUG_CHANNEL(wscript); @@ -159,8 +160,11 @@ static HRESULT WINAPI Host_get_Arguments(IHost *iface, IArguments2 **out_Argumen static HRESULT WINAPI Host_get_Version(IHost *iface, BSTR *out_Version) { - WINE_FIXME("(%p)\n", out_Version); - return E_NOTIMPL; + WINE_TRACE("(%p)\n", out_Version); + + if(!(*out_Version = SysAllocString(wshVersionW))) + return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI Host_get_BuildVersion(IHost *iface, int *out_Build) diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index 84d7789..8b43ce7 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -26,5 +26,6 @@ ok(typeof(WScript) === "object", "typeof(WScript) = " + typeof(WScript)); ok(typeof(WSH) === "object", "typeof(WSH) = " + typeof(WSH)); ok(WScript === WSH, "WScript !== WSH"); ok(WScript.Name === "Windows Script Host", "WScript.Name = " + WScript.Name); +ok(typeof(WScript.Version) === "string", "typeof(WScript.Version) = " + typeof(WScript.Version)); winetest.reportSuccess();
1
0
0
0
Michał Ziętek : wscript: Implemented Host_get_Name.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: 2c2527e3cb1a5cd8fb66ac8d96174fa2c911f820 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c2527e3cb1a5cd8fb66ac8d9…
Author: Michał Ziętek <smierc.w.wenecji(a)gmail.com> Date: Tue Jun 28 13:37:36 2011 +0200 wscript: Implemented Host_get_Name. --- programs/wscript/host.c | 9 +++++++-- programs/wscript/tests/run.js | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 9634100..3021656 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -29,6 +29,8 @@ #include <wine/debug.h> +static const WCHAR wshNameW[] = {'W','i','n','d','o','w','s',' ','S','c','r','i','p','t',' ','H','o','s','t',0}; + WINE_DEFAULT_DEBUG_CHANNEL(wscript); static HRESULT WINAPI Host_QueryInterface(IHost *iface, REFIID riid, void **ppv) @@ -94,8 +96,11 @@ static HRESULT WINAPI Host_Invoke(IHost *iface, DISPID dispIdMember, REFIID riid static HRESULT WINAPI Host_get_Name(IHost *iface, BSTR *out_Name) { - WINE_FIXME("(%p)\n", out_Name); - return E_NOTIMPL; + WINE_TRACE("(%p)\n", out_Name); + + if(!(*out_Name = SysAllocString(wshNameW))) + return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI Host_get_Application(IHost *iface, IDispatch **out_Dispatch) diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index 809fa2f..84d7789 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -25,5 +25,6 @@ function ok(expr, msg) { ok(typeof(WScript) === "object", "typeof(WScript) = " + typeof(WScript)); ok(typeof(WSH) === "object", "typeof(WSH) = " + typeof(WSH)); ok(WScript === WSH, "WScript !== WSH"); +ok(WScript.Name === "Windows Script Host", "WScript.Name = " + WScript.Name); winetest.reportSuccess();
1
0
0
0
Alistair Leslie-Hughes : mscoree: Define interface IManagedObject.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: 36b0323cebbd7cc0b99c8704f7d5776786d9c5ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36b0323cebbd7cc0b99c8704f…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Jun 28 22:34:03 2011 +1000 mscoree: Define interface IManagedObject. --- include/mscoree.idl | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/include/mscoree.idl b/include/mscoree.idl index f8698cb..4160264 100644 --- a/include/mscoree.idl +++ b/include/mscoree.idl @@ -224,3 +224,17 @@ interface ICLRRuntimeHost : IUnknown [in] LPCWSTR pwzArgument, [out] DWORD *pReturnValue); } + +[ + uuid(C3FCC19E-A970-11d2-8B5A-00A0C9B7C9C4), + local, + object +] +interface IManagedObject : IUnknown +{ + HRESULT GetSerializedBuffer([out] BSTR *pBSTR); + + HRESULT GetObjectIdentity([out] BSTR *pBSTRGUID, + [out] int *AppDomainID, + [out] int *pCCW); +}
1
0
0
0
Marcus Meissner : wrc: Fixed some small leaks in PO code (Coverity).
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: b07408cf82a9b7fc4dc093d08d07f835fad3bf48 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b07408cf82a9b7fc4dc093d08…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Tue Jun 28 08:31:29 2011 +0200 wrc: Fixed some small leaks in PO code (Coverity). --- tools/wmc/po.c | 1 + tools/wrc/po.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tools/wmc/po.c b/tools/wmc/po.c index 06b5bc7..1cdf521 100644 --- a/tools/wmc/po.c +++ b/tools/wmc/po.c @@ -325,6 +325,7 @@ static char *convert_msgid_ascii( const lanmsg_t *msg, int error_on_invalid_char fprintf( stderr, "%s:%d: ", msg->file, msg->line ); error( "Invalid character %04x in source string\n", msg->msg[i] ); } + free( buffer ); return NULL; } buffer[i] = 0; diff --git a/tools/wrc/po.c b/tools/wrc/po.c index ef1e9f2..af882cb 100644 --- a/tools/wrc/po.c +++ b/tools/wrc/po.c @@ -332,6 +332,7 @@ static char *convert_msgid_ascii( const string_t *str, int error_on_invalid_char print_location( &newstr->loc ); error( "Invalid character %04x in source string\n", newstr->str.wstr[i] ); } + free( buffer); free_string( newstr ); return NULL; } @@ -940,7 +941,11 @@ void add_translations( const char *po_dir ) new_top = new_tail = NULL; name = strmake( "%s/LINGUAS", po_dir ); - if (!(f = fopen( name, "r" ))) return; + if (!(f = fopen( name, "r" ))) + { + free( name ); + return; + } free( name ); while (fgets( buffer, sizeof(buffer), f )) {
1
0
0
0
Stefan Dösinger : wined3d: Update the vertex shader when the clipplanes are changed.
by Alexandre Julliard
28 Jun '11
28 Jun '11
Module: wine Branch: master Commit: a27adc478a5f8f46d8c36ce7aa9db3d6fb051633 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a27adc478a5f8f46d8c36ce7a…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Jun 28 12:40:02 2011 +0200 wined3d: Update the vertex shader when the clipplanes are changed. --- dlls/wined3d/state.c | 71 ++++++++++++++++++++++++++++++------------------- 1 files changed, 43 insertions(+), 28 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index b17a254..bb2b292 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -484,28 +484,59 @@ static void state_alpha(DWORD state, struct wined3d_stateblock *stateblock, stru } } +static void shaderconstant(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) +{ + const struct wined3d_state *state = &stateblock->state; + struct wined3d_device *device = stateblock->device; + + /* Vertex and pixel shader states will call a shader upload, don't do anything as long one of them + * has an update pending + */ + if(isStateDirty(context, STATE_VDECL) || + isStateDirty(context, STATE_PIXELSHADER)) { + return; + } + + device->shader_backend->shader_load_constants(context, use_ps(state), use_vs(state)); +} + static void state_clipping(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { const struct wined3d_state *state = &stateblock->state; DWORD enable = 0xFFFFFFFF; DWORD disable = 0x00000000; - if (!stateblock->device->vs_clipping && use_vs(state)) + if (use_vs(state)) { - /* The spec says that opengl clipping planes are disabled when using shaders. Direct3D planes aren't, - * so that is an issue. The MacOS ATI driver keeps clipping planes activated with shaders in some - * conditions I got sick of tracking down. The shader state handler disables all clip planes because - * of that - don't do anything here and keep them disabled - */ - if (state->render_states[WINED3DRS_CLIPPLANEENABLE]) + const struct wined3d_device *device = stateblock->device; + + if (!device->vs_clipping) { - static BOOL warned = FALSE; - if(!warned) { - FIXME("Clipping not supported with vertex shaders\n"); - warned = TRUE; + /* The spec says that opengl clipping planes are disabled when using shaders. Direct3D planes aren't, + * so that is an issue. The MacOS ATI driver keeps clipping planes activated with shaders in some + * conditions I got sick of tracking down. The shader state handler disables all clip planes because + * of that - don't do anything here and keep them disabled + */ + if (state->render_states[WINED3DRS_CLIPPLANEENABLE]) + { + static BOOL warned = FALSE; + if(!warned) { + FIXME("Clipping not supported with vertex shaders\n"); + warned = TRUE; + } + } + return; + } + + /* glEnable(GL_CLIP_PLANEx) doesn't apply to vertex shaders. The enabled / disabled planes are + * hardcoded into the shader. Update the shader to update the enabled clipplanes */ + if (!isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) + { + device->shader_backend->shader_select(context, use_ps(state), TRUE); + if (!isStateDirty(context, STATE_VERTEXSHADERCONSTANT)) { + shaderconstant(STATE_VERTEXSHADERCONSTANT, stateblock, context); } } - return; } /* TODO: Keep track of previously enabled clipplanes to avoid unnecessary resetting @@ -3460,22 +3491,6 @@ static void tex_coordindex(DWORD state, struct wined3d_stateblock *stateblock, s } } -static void shaderconstant(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context) -{ - const struct wined3d_state *state = &stateblock->state; - struct wined3d_device *device = stateblock->device; - - /* Vertex and pixel shader states will call a shader upload, don't do anything as long one of them - * has an update pending - */ - if(isStateDirty(context, STATE_VDECL) || - isStateDirty(context, STATE_PIXELSHADER)) { - return; - } - - device->shader_backend->shader_load_constants(context, use_ps(state), use_vs(state)); -} - static void tex_bumpenvlscale(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context) { DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
81
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
Results per page:
10
25
50
100
200