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
January 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
893 discussions
Start a n
N
ew thread
Stefan Dösinger : wined3d: Catch nop pixel shader changes.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: 4e0f7ccd7d63d65fed899f0fea86ab633e34e7bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e0f7ccd7d63d65fed899f0fe…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Jan 4 00:07:45 2007 +0100 wined3d: Catch nop pixel shader changes. --- dlls/wined3d/device.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6a51771..f53f339 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3260,6 +3260,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); + return WINED3D_OK; + } else if(oldShader == pShader) { + /* Checked here to allow proper stateblock recording */ + TRACE("App is setting the old shader over, nothing to do\n"); + return WINED3D_OK; } if (NULL != pShader) { @@ -5832,7 +5837,7 @@ static void device_reapply_stateblock(IW /* Temporaryily mark all render states dirty to force reapplication * until the context management for is integrated with the state management - * The same for the pixel shader, vertex declaration + * The same for the pixel shader, vertex declaration and vertex shader * Sampler states and texture stage states are marked * dirty my StateBlock::Apply already. */ @@ -5841,6 +5846,7 @@ static void device_reapply_stateblock(IW } IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VSHADER); /* Restore recording */ This->isRecordingState = oldRecording;
1
0
0
0
Stefan Dösinger : wined3d: Catch NOP vertex declaration changes.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: cd9a3517f3ee5309979c7ea3cb734576f37d0560 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd9a3517f3ee5309979c7ea3c…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Jan 4 00:07:00 2007 +0100 wined3d: Catch NOP vertex declaration changes. --- dlls/wined3d/device.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a1aab0d..6a51771 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2151,10 +2151,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; /* Update the current state block */ - This->updateStateBlock->fvf = fvf; This->updateStateBlock->changed.fvf = TRUE; This->updateStateBlock->set.fvf = TRUE; + if(This->updateStateBlock->fvf == fvf) { + TRACE("Application is setting the old fvf over, nothing to do\n"); + return WINED3D_OK; + } + + This->updateStateBlock->fvf = fvf; TRACE("(%p) : FVF Shader FVF set to %x\n", This, fvf); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL); return WINED3D_OK; @@ -3218,6 +3223,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); + return WINED3D_OK; + } else if(pDecl == oldDecl) { + /* Checked after the assignment to allow proper stateblock recording */ + TRACE("Application is setting the old declaration over, nothing to do\n"); + return WINED3D_OK; } if (NULL != pDecl) { @@ -5822,13 +5832,15 @@ static void device_reapply_stateblock(IW /* Temporaryily mark all render states dirty to force reapplication * until the context management for is integrated with the state management - * The same for the pixel shader, sampler states and texture stage states are marked - * dirty my StateBlock::Apply already + * The same for the pixel shader, vertex declaration + * Sampler states and texture stage states are marked + * dirty my StateBlock::Apply already. */ for(i = 1; i < WINEHIGHEST_RENDER_STATE; i++) { IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(i)); } IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER); + IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VDECL); /* Restore recording */ This->isRecordingState = oldRecording;
1
0
0
0
Stefan Dösinger : wined3d: Break the viewport out of the vertex declaration state.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: 0d700bef5decbd03cd4f1f6838c7e99ef5539d50 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d700bef5decbd03cd4f1f683…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Jan 4 00:05:05 2007 +0100 wined3d: Break the viewport out of the vertex declaration state. --- dlls/wined3d/device.c | 16 ---------------- dlls/wined3d/state.c | 27 +++++++++++++++++++++++---- dlls/wined3d/wined3d_private.h | 1 - 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 676f875..a1aab0d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3055,26 +3055,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl TRACE("Recording... not performing anything\n"); return WINED3D_OK; } - This->viewport_changed = TRUE; - - ENTER_GL(); TRACE("(%p) : x=%d, y=%d, wid=%d, hei=%d, minz=%f, maxz=%f\n", This, pViewport->X, pViewport->Y, pViewport->Width, pViewport->Height, pViewport->MinZ, pViewport->MaxZ); - glDepthRange(pViewport->MinZ, pViewport->MaxZ); - checkGLcall("glDepthRange"); - /* Note: GL requires lower left, DirectX supplies upper left */ - /* TODO: replace usage of renderTarget with context management */ - glViewport(pViewport->X, - (((IWineD3DSurfaceImpl *)This->render_targets[0])->currentDesc.Height - (pViewport->Y + pViewport->Height)), - pViewport->Width, pViewport->Height); - - checkGLcall("glViewport"); - - LEAVE_GL(); - - /* Todo: move the gl code too */ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VIEWPORT); return WINED3D_OK; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 935bd90..38d7883 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -2059,8 +2059,6 @@ static void vertexdeclaration(DWORD stat */ if (useVertexShaderFunction) { device->posFixup[1] = device->render_offscreen ? -1.0 : 1.0; - device->posFixup[2] = 0.9 / stateblock->viewport.Width; - device->posFixup[3] = -0.9 / stateblock->viewport.Height; } } @@ -2071,7 +2069,9 @@ static void vertexdeclaration(DWORD stat /* TODO: Move this mainly to the viewport state and only apply when the vp has changed * or transformed / untransformed was switched */ - if(!isStateDirty(stateblock->wineD3DDevice, STATE_TRANSFORM(WINED3DTS_PROJECTION))) { + if(wasrhw != device->last_was_rhw && + !isStateDirty(stateblock->wineD3DDevice, STATE_TRANSFORM(WINED3DTS_PROJECTION)) && + !isStateDirty(stateblock->wineD3DDevice, STATE_VIEWPORT)) { transform_projection(STATE_TRANSFORM(WINED3DTS_PROJECTION), stateblock); } /* World matrix needs reapplication here only if we're switching between rhw and non-rhw @@ -2097,6 +2097,25 @@ static void vertexdeclaration(DWORD stat } } +static void viewport(DWORD state, IWineD3DStateBlockImpl *stateblock) { + glDepthRange(stateblock->viewport.MinZ, stateblock->viewport.MaxZ); + checkGLcall("glDepthRange"); + /* Note: GL requires lower left, DirectX supplies upper left */ + /* TODO: replace usage of renderTarget with context management */ + glViewport(stateblock->viewport.X, + (((IWineD3DSurfaceImpl *)stateblock->wineD3DDevice->render_targets[0])->currentDesc.Height - (stateblock->viewport.Y + stateblock->viewport.Height)), + stateblock->viewport.Width, stateblock->viewport.Height); + + checkGLcall("glViewport"); + + stateblock->wineD3DDevice->posFixup[2] = 0.9 / stateblock->viewport.Width; + stateblock->wineD3DDevice->posFixup[3] = -0.9 / stateblock->viewport.Height; + if(!isStateDirty(stateblock->wineD3DDevice, STATE_TRANSFORM(D3DTS_PROJECTION))) { + transform_projection(STATE_TRANSFORM(D3DTS_PROJECTION), stateblock); + } + +} + const struct StateEntry StateTable[] = { /* State name representative, apply function */ @@ -3114,6 +3133,6 @@ const struct StateEntry StateTable[] = { /* , STATE_STREAMSRC */ STATE_VDECL, vertexdeclaration }, { /* , STATE_VDECL */ STATE_VDECL, vertexdeclaration }, { /* , STATE_VSHADER */ STATE_VDECL, vertexdeclaration }, - { /* , STATE_VIEWPORT */ STATE_VDECL, vertexdeclaration }, + { /* , STATE_VIEWPORT */ STATE_VIEWPORT, viewport }, }; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0e5dc23..a63e577 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -565,7 +565,6 @@ typedef struct IWineD3DDeviceImpl /* Optimization */ BOOL view_ident; /* true iff view matrix is identity */ BOOL last_was_rhw; /* true iff last draw_primitive was in xyzrhw mode */ - BOOL viewport_changed; /* Was the viewport changed since the last draw? */ GLenum tracking_parm; /* Which source is tracking current colour */ LONG tracking_color; /* used iff GL_COLOR_MATERIAL was enabled */ #define DISABLED_TRACKING 0 /* Disabled */
1
0
0
0
Vitaliy Margolen : dinput: Implement mouse GetObjectInfo on top of base class.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: f2a3ad24812b394a22b84debd1317a58910e5bdc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2a3ad24812b394a22b84debd…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Wed Jan 3 23:04:39 2007 -0700 dinput: Implement mouse GetObjectInfo on top of base class. --- dlls/dinput/mouse.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 47 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 81e520e..91136b6 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -654,6 +654,51 @@ static HRESULT WINAPI SysMouseAImpl_GetC return DI_OK; } +/****************************************************************************** + * GetObjectInfo : get information about a device object such as a button + * or axis + */ +static HRESULT WINAPI SysMouseWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, + LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) +{ + static const WCHAR x_axisW[] = {'X','-','A','x','i','s',0}; + static const WCHAR y_axisW[] = {'X','-','A','x','i','s',0}; + static const WCHAR wheelW[] = {'W','h','e','e','l',0}; + static const WCHAR buttonW[] = {'B','u','t','t','o','n',' ','%','d',0}; + HRESULT res; + + res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow); + if (res != DI_OK) return res; + + if (IsEqualGUID(&pdidoi->guidType, &GUID_XAxis)) strcpyW(pdidoi->tszName, x_axisW); + else if (IsEqualGUID(&pdidoi->guidType, &GUID_YAxis)) strcpyW(pdidoi->tszName, y_axisW); + else if (IsEqualGUID(&pdidoi->guidType, &GUID_ZAxis)) strcpyW(pdidoi->tszName, wheelW); + else if (pdidoi->dwType & DIDFT_BUTTON) + wsprintfW(pdidoi->tszName, buttonW, DIDFT_GETINSTANCE(pdidoi->dwType) - 3); + + _dump_OBJECTINSTANCEW(pdidoi); + return res; +} + +static HRESULT WINAPI SysMouseAImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8A iface, + LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) +{ + HRESULT res; + DIDEVICEOBJECTINSTANCEW didoiW; + DWORD dwSize = pdidoi->dwSize; + + didoiW.dwSize = sizeof(didoiW); + res = SysMouseWImpl_GetObjectInfo((LPDIRECTINPUTDEVICE8W)iface, &didoiW, dwObj, dwHow); + if (res != DI_OK) return res; + + memset(pdidoi, 0, pdidoi->dwSize); + memcpy(pdidoi, &didoiW, FIELD_OFFSET(DIDEVICEOBJECTINSTANCEW, tszName)); + pdidoi->dwSize = dwSize; + WideCharToMultiByte(CP_ACP, 0, didoiW.tszName, -1, pdidoi->tszName, + sizeof(pdidoi->tszName), NULL, NULL); + + return res; +} /****************************************************************************** * GetDeviceInfo : get information about a device's identity @@ -707,7 +752,7 @@ static const IDirectInputDevice8AVtbl Sy IDirectInputDevice2AImpl_SetDataFormat, IDirectInputDevice2AImpl_SetEventNotification, IDirectInputDevice2AImpl_SetCooperativeLevel, - IDirectInputDevice2AImpl_GetObjectInfo, + SysMouseAImpl_GetObjectInfo, SysMouseAImpl_GetDeviceInfo, IDirectInputDevice2AImpl_RunControlPanel, IDirectInputDevice2AImpl_Initialize, @@ -749,7 +794,7 @@ static const IDirectInputDevice8WVtbl Sy XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat, XCAST(SetEventNotification)IDirectInputDevice2AImpl_SetEventNotification, XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel, - IDirectInputDevice2WImpl_GetObjectInfo, + SysMouseWImpl_GetObjectInfo, SysMouseWImpl_GetDeviceInfo, XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel, XCAST(Initialize)IDirectInputDevice2AImpl_Initialize,
1
0
0
0
Vitaliy Margolen : dinput: Move keyboard to using new GetObjectInfo.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: 20ba784aace697fed167bb702e175c0f1b0a1a29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20ba784aace697fed167bb702…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Wed Jan 3 23:04:31 2007 -0700 dinput: Move keyboard to using new GetObjectInfo. --- dlls/dinput/keyboard.c | 58 +++++++++++------------------------------------ 1 files changed, 14 insertions(+), 44 deletions(-) diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index ce04ff9..b77e258 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -415,33 +415,18 @@ SysKeyboardAImpl_GetObjectInfo( DWORD dwObj, DWORD dwHow) { - SysKeyboardImpl *This = (SysKeyboardImpl *)iface; - DIDEVICEOBJECTINSTANCEA ddoi; - DWORD dwSize = pdidoi->dwSize; - - TRACE("(this=%p,%p,%d,0x%08x)\n", This, pdidoi, dwObj, dwHow); - - if (dwHow == DIPH_BYID) { - WARN(" querying by id not supported yet...\n"); - return DI_OK; - } + HRESULT res; - memset(pdidoi, 0, dwSize); - memset(&ddoi, 0, sizeof(ddoi)); + res = IDirectInputDevice2AImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow); + if (res != DI_OK) return res; - ddoi.dwSize = dwSize; - ddoi.guidType = GUID_Key; - ddoi.dwOfs = dwObj; - ddoi.dwType = DIDFT_MAKEINSTANCE(dwObj) | DIDFT_BUTTON; - if (!GetKeyNameTextA(((dwObj & 0x7f) << 16) | ((dwObj & 0x80) << 17), ddoi.tszName, sizeof(ddoi.tszName))) + if (!GetKeyNameTextA((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 | + (DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16, + pdidoi->tszName, sizeof(pdidoi->tszName))) return DIERR_OBJECTNOTFOUND; - /* And return our just filled device object instance structure */ - memcpy(pdidoi, &ddoi, (dwSize < sizeof(ddoi) ? dwSize : sizeof(ddoi))); - _dump_OBJECTINSTANCEA(pdidoi); - - return DI_OK; + return res; } static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, @@ -449,33 +434,18 @@ static HRESULT WINAPI SysKeyboardWImpl_G DWORD dwObj, DWORD dwHow) { - SysKeyboardImpl *This = (SysKeyboardImpl *)iface; - DIDEVICEOBJECTINSTANCEW ddoi; - DWORD dwSize = pdidoi->dwSize; - - TRACE("(this=%p,%p,%d,0x%08x)\n", This, pdidoi, dwObj, dwHow); - - if (dwHow == DIPH_BYID) { - WARN(" querying by id not supported yet...\n"); - return DI_OK; - } + HRESULT res; - memset(pdidoi, 0, dwSize); - memset(&ddoi, 0, sizeof(ddoi)); + res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow); + if (res != DI_OK) return res; - ddoi.dwSize = dwSize; - ddoi.guidType = GUID_Key; - ddoi.dwOfs = dwObj; - ddoi.dwType = DIDFT_MAKEINSTANCE(dwObj) | DIDFT_BUTTON; - if (!GetKeyNameTextW(((dwObj & 0x7f) << 16) | ((dwObj & 0x80) << 17), ddoi.tszName, sizeof(ddoi.tszName))) + if (!GetKeyNameTextW((DIDFT_GETINSTANCE(pdidoi->dwType) & 0x80) << 17 | + (DIDFT_GETINSTANCE(pdidoi->dwType) & 0x7f) << 16, + pdidoi->tszName, sizeof(pdidoi->tszName))) return DIERR_OBJECTNOTFOUND; - /* And return our just filled device object instance structure */ - memcpy(pdidoi, &ddoi, (dwSize < sizeof(ddoi) ? dwSize : sizeof(ddoi))); - _dump_OBJECTINSTANCEW(pdidoi); - - return DI_OK; + return res; } /******************************************************************************
1
0
0
0
Vitaliy Margolen : dinput: Implement GetObjectInfo[A|W] in base device class.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: 0edc6e26a75159efc63965bb029d372ed06525f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0edc6e26a75159efc63965bb0…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Wed Jan 3 23:04:24 2007 -0700 dinput: Implement GetObjectInfo[A|W] in base device class. --- dlls/dinput/device.c | 79 +++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 72 insertions(+), 7 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 944091c..460c7ee 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -294,6 +294,12 @@ void release_DataFormat(DataFormat * for format->user_df = NULL; } +inline LPDIOBJECTDATAFORMAT dataformat_to_odf(LPCDIDATAFORMAT df, int idx) +{ + if (idx < 0 || idx >= df->dwNumObjs) return NULL; + return (LPDIOBJECTDATAFORMAT)((LPBYTE)df->rgodf + idx * df->dwObjSize); +} + /* Make all instances sequential */ static void calculate_ids(LPDIDATAFORMAT df) { @@ -971,10 +977,29 @@ HRESULT WINAPI IDirectInputDevice2AImpl_ DWORD dwObj, DWORD dwHow) { - FIXME("(this=%p,%p,%d,0x%08x): stub!\n", - iface, pdidoi, dwObj, dwHow); - - return DI_OK; + DIDEVICEOBJECTINSTANCEW didoiW; + HRESULT res; + + if (!pdidoi || + (pdidoi->dwSize != sizeof(DIDEVICEOBJECTINSTANCEA) && + pdidoi->dwSize != sizeof(DIDEVICEOBJECTINSTANCE_DX3A))) + return DIERR_INVALIDPARAM; + + didoiW.dwSize = sizeof(didoiW); + res = IDirectInputDevice2WImpl_GetObjectInfo((LPDIRECTINPUTDEVICE8W)iface, &didoiW, dwObj, dwHow); + if (res == DI_OK) + { + DWORD dwSize = pdidoi->dwSize; + + memset(pdidoi, 0, pdidoi->dwSize); + pdidoi->dwSize = dwSize; + pdidoi->guidType = didoiW.guidType; + pdidoi->dwOfs = didoiW.dwOfs; + pdidoi->dwType = didoiW.dwType; + pdidoi->dwFlags = didoiW.dwFlags; + } + + return res; } HRESULT WINAPI IDirectInputDevice2WImpl_GetObjectInfo( @@ -983,9 +1008,49 @@ HRESULT WINAPI IDirectInputDevice2WImpl_ DWORD dwObj, DWORD dwHow) { - FIXME("(this=%p,%p,%d,0x%08x): stub!\n", - iface, pdidoi, dwObj, dwHow); - + IDirectInputDevice2AImpl *This = (IDirectInputDevice2AImpl *)iface; + DWORD dwSize = pdidoi->dwSize; + LPDIOBJECTDATAFORMAT odf; + int idx = -1; + + TRACE("(%p) %d(0x%08x) -> %p\n", This, dwHow, dwObj, pdidoi); + + if (!pdidoi || + (pdidoi->dwSize != sizeof(DIDEVICEOBJECTINSTANCEW) && + pdidoi->dwSize != sizeof(DIDEVICEOBJECTINSTANCE_DX3W))) + return DIERR_INVALIDPARAM; + + switch (dwHow) + { + case DIPH_BYOFFSET: + if (!This->data_format.offsets) break; + for (idx = This->data_format.wine_df->dwNumObjs - 1; idx >= 0; idx--) + if (This->data_format.offsets[idx] == dwObj) break; + break; + case DIPH_BYID: + dwObj &= 0x00ffffff; + for (idx = This->data_format.wine_df->dwNumObjs - 1; idx >= 0; idx--) + if ((dataformat_to_odf(This->data_format.wine_df, idx)->dwType & 0x00ffffff) == dwObj) + break; + break; + + case DIPH_BYUSAGE: + FIXME("dwHow = DIPH_BYUSAGE not implemented\n"); + break; + default: + WARN("invalid parameter: dwHow = %08x\n", dwHow); + return DIERR_INVALIDPARAM; + } + if (idx < 0) return DIERR_OBJECTNOTFOUND; + + odf = dataformat_to_odf(This->data_format.wine_df, idx); + memset(pdidoi, 0, pdidoi->dwSize); + pdidoi->dwSize = dwSize; + pdidoi->guidType = *odf->pguid; + pdidoi->dwOfs = This->data_format.offsets ? This->data_format.offsets[idx] : odf->dwOfs; + pdidoi->dwType = odf->dwType; + pdidoi->dwFlags = odf->dwFlags; + return DI_OK; }
1
0
0
0
Mike McCormack : kernel32: Don' t try update version resources with invalid data, as it fails on Windows 2003.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: b4bc2c362851cb4e3789b47e8c9e1a000f0dbe8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b4bc2c362851cb4e3789b47e8…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Wed Jan 3 22:37:38 2007 +0900 kernel32: Don't try update version resources with invalid data, as it fails on Windows 2003. --- dlls/kernel32/tests/resource.c | 22 +++------------------- 1 files changed, 3 insertions(+), 19 deletions(-) diff --git a/dlls/kernel32/tests/resource.c b/dlls/kernel32/tests/resource.c index 964f17a..47bfc7c 100644 --- a/dlls/kernel32/tests/resource.c +++ b/dlls/kernel32/tests/resource.c @@ -161,31 +161,15 @@ static void update_resources_delete( voi todo_wine ok( r, "EndUpdateResouce failed\n"); } -struct verhdr { - WORD wLength; - WORD wValueLength; - WORD wType; - WCHAR key[1]; -}; - void update_resources_version(void) { HANDLE res = NULL; BOOL r; - struct verhdr hdr; char foo[] = "red and white"; res = BeginUpdateResource( filename, TRUE ); ok( res != NULL, "BeginUpdateResource failed\n"); - memset( &hdr, 0, sizeof hdr ); - r = UpdateResource( res, - RT_VERSION, - MAKEINTRESOURCE(VS_VERSION_INFO), - MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), - &hdr, sizeof hdr ); - ok( r, "UpdateResouce failed\n"); - r = UpdateResource( res, MAKEINTRESOURCE(0x1230), MAKEINTRESOURCE(0x4567), @@ -219,10 +203,10 @@ void check_empty( IMAGE_RESOURCE_DIRECTO todo_wine ok( !memcmp( pad, "PADDINGXXPADDING", 16), "padding wrong\n"); } -void check_version( IMAGE_RESOURCE_DIRECTORY *dir ) +void check_not_empty( IMAGE_RESOURCE_DIRECTORY *dir ) { ok( dir->NumberOfNamedEntries == 0, "NumberOfNamedEntries should be 0 instead of %d\n", dir->NumberOfNamedEntries); - todo_wine ok( dir->NumberOfIdEntries == 2, "NumberOfIdEntries should be 2 instead of %d\n", dir->NumberOfIdEntries); + todo_wine ok( dir->NumberOfIdEntries == 1, "NumberOfIdEntries should be 1 instead of %d\n", dir->NumberOfIdEntries); } void check_exe( res_check_func fn ) @@ -287,6 +271,6 @@ START_TEST(resource) update_resources_delete(); check_exe( check_empty ); update_resources_version(); - check_exe( check_version ); + check_exe( check_not_empty ); DeleteFile( filename ); }
1
0
0
0
Roderick Colenbrander : wgl: Fix piAttributes NULL crash.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: e4eac235f1a779bea629d409f54caecdf0696093 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4eac235f1a779bea629d409f…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Thu Jan 4 00:15:54 2007 +0100 wgl: Fix piAttributes NULL crash. --- dlls/winex11.drv/opengl.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index e0ce8b0..ebc980e 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -605,6 +605,10 @@ static int ConvertAttribWGLtoGLX(const i int wantColorBits = 0; int sz_alpha = 0; + /* The list of WGL attributes is allowed to be NULL, so don't return -1 (error) but just 0 */ + if(iWGLAttr == NULL) + return 0; + while (0 != iWGLAttr[cur]) { TRACE("pAttr[%d] = %x\n", cur, iWGLAttr[cur]); @@ -1963,7 +1967,7 @@ static HPBUFFERARB WINAPI X11DRV_wglCrea } PUSH2(attribs, GLX_PBUFFER_WIDTH, iWidth); PUSH2(attribs, GLX_PBUFFER_HEIGHT, iHeight); - while (0 != *piAttribList) { + while (piAttribList && 0 != *piAttribList) { int attr_v; switch (*piAttribList) { case WGL_TEXTURE_FORMAT_ARB: {
1
0
0
0
Andrew Talbot : ddraw: Declare some functions static.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: 7c95df77ae13eaf0b7700a497bc6262388cb1d3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c95df77ae13eaf0b7700a497…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Wed Jan 3 19:11:49 2007 +0000 ddraw: Declare some functions static. --- dlls/ddraw/utils.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index 32005f5..bf31780 100644 --- a/dlls/ddraw/utils.c +++ b/dlls/ddraw/utils.c @@ -624,7 +624,7 @@ DDRAW_dump_PTR(const void *in) { DPRINTF("%p", *((const void * const*) in)); } -void +static void DDRAW_dump_DDCOLORKEY(const DDCOLORKEY *ddck) { DPRINTF(" Low : %d - High : %d", ddck->dwColorSpaceLowValue, ddck->dwColorSpaceHighValue); @@ -719,7 +719,7 @@ DDRAW_dump_flags_(DWORD flags, DPRINTF("\n"); } -void +static void DDRAW_dump_pixelformat_flag(DWORD flagmask) { static const flag_info flags[] =
1
0
0
0
Andrew Talbot : comdlg32: Declare some items static.
by Alexandre Julliard
04 Jan '07
04 Jan '07
Module: wine Branch: master Commit: 6bb00a3c0ec3b1bf430363dafd24b2026c8582e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6bb00a3c0ec3b1bf430363daf…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Wed Jan 3 13:47:44 2007 +0000 comdlg32: Declare some items static. --- dlls/comdlg32/cdlg32.c | 4 ++-- dlls/comdlg32/filedlg.c | 2 +- dlls/comdlg32/fontdlg.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/comdlg32/cdlg32.c b/dlls/comdlg32/cdlg32.c index 91144a8..57f3036 100644 --- a/dlls/comdlg32/cdlg32.c +++ b/dlls/comdlg32/cdlg32.c @@ -38,8 +38,8 @@ HINSTANCE COMDLG32_hInstance = 0; static DWORD COMDLG32_TlsIndex = TLS_OUT_OF_INDEXES; -HINSTANCE SHELL32_hInstance = 0; -HINSTANCE SHFOLDER_hInstance = 0; +static HINSTANCE SHELL32_hInstance; +static HINSTANCE SHFOLDER_hInstance; /* ITEMIDLIST */ LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILClone) (LPCITEMIDLIST); diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 2addb9c..5fcdfd0 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -227,7 +227,7 @@ static LPITEMIDLIST GetPidlFromName(IShe static void *MemAlloc(UINT size); static void MemFree(void *mem); -INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +static INT_PTR CALLBACK FileOpenDlgProc95(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode); static INT_PTR FILEDLG95_HandleCustomDialogMessages(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static BOOL FILEDLG95_OnOpenMultipleFiles(HWND hwnd, LPWSTR lpstrFileList, UINT nFileCount, UINT sizeUsed); diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index 510d4de..cd36ed3 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -47,8 +47,8 @@ static const WCHAR chooseFontW[] = {'C', static HIMAGELIST himlTT = 0; #define TTBITMAP_XSIZE 20 /* x-size of the bitmaps */ -INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +static INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +static INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); /* There is a table here of all charsets, and the sample text for each. * There is a second table that translates a charset into an index into
1
0
0
0
← Newer
1
...
75
76
77
78
79
80
81
...
90
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
Results per page:
10
25
50
100
200