Commit dc67164d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Fix some more misspellings of "device".

parent db4babfb
...@@ -326,9 +326,9 @@ fail: ...@@ -326,9 +326,9 @@ fail:
} }
/* Adjust the amount of used texture memory */ /* Adjust the amount of used texture memory */
long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram) long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *device, long glram)
{ {
struct wined3d_adapter *adapter = D3DDevice->adapter; struct wined3d_adapter *adapter = device->adapter;
adapter->UsedTextureRam += glram; adapter->UsedTextureRam += glram;
TRACE("Adjusted gl ram by %ld to %d\n", glram, adapter->UsedTextureRam); TRACE("Adjusted gl ram by %ld to %d\n", glram, adapter->UsedTextureRam);
......
...@@ -866,7 +866,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) ...@@ -866,7 +866,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
return WINED3D_OK; return WINED3D_OK;
} }
static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl *This) static void apply_lights(IWineD3DDevice *device, const IWineD3DStateBlockImpl *This)
{ {
UINT i; UINT i;
for(i = 0; i < LIGHTMAP_SIZE; i++) { for(i = 0; i < LIGHTMAP_SIZE; i++) {
...@@ -876,8 +876,8 @@ static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl * ...@@ -876,8 +876,8 @@ static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl *
{ {
const struct wined3d_light_info *light = LIST_ENTRY(e, struct wined3d_light_info, entry); const struct wined3d_light_info *light = LIST_ENTRY(e, struct wined3d_light_info, entry);
IWineD3DDevice_SetLight(pDevice, light->OriginalIndex, &light->OriginalParms); IWineD3DDevice_SetLight(device, light->OriginalIndex, &light->OriginalParms);
IWineD3DDevice_SetLightEnable(pDevice, light->OriginalIndex, light->glIndex != -1); IWineD3DDevice_SetLightEnable(device, light->OriginalIndex, light->glIndex != -1);
} }
} }
} }
...@@ -885,58 +885,58 @@ static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl * ...@@ -885,58 +885,58 @@ static void apply_lights(IWineD3DDevice *pDevice, const IWineD3DStateBlockImpl *
static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
{ {
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
IWineD3DDevice *pDevice = (IWineD3DDevice *)This->device; IWineD3DDevice *device = (IWineD3DDevice *)This->device;
unsigned int i; unsigned int i;
DWORD map; DWORD map;
TRACE("(%p) : Applying state block %p ------------------v\n", This, pDevice); TRACE("(%p) : Applying state block %p ------------------v\n", This, device);
TRACE("Blocktype: %d\n", This->blockType); TRACE("Blocktype: %d\n", This->blockType);
if (This->changed.vertexShader) IWineD3DDevice_SetVertexShader(pDevice, This->vertexShader); if (This->changed.vertexShader) IWineD3DDevice_SetVertexShader(device, This->vertexShader);
/* Vertex Shader Constants */ /* Vertex Shader Constants */
for (i = 0; i < This->num_contained_vs_consts_f; ++i) for (i = 0; i < This->num_contained_vs_consts_f; ++i)
{ {
IWineD3DDevice_SetVertexShaderConstantF(pDevice, This->contained_vs_consts_f[i], IWineD3DDevice_SetVertexShaderConstantF(device, This->contained_vs_consts_f[i],
This->vertexShaderConstantF + This->contained_vs_consts_f[i] * 4, 1); This->vertexShaderConstantF + This->contained_vs_consts_f[i] * 4, 1);
} }
for (i = 0; i < This->num_contained_vs_consts_i; ++i) for (i = 0; i < This->num_contained_vs_consts_i; ++i)
{ {
IWineD3DDevice_SetVertexShaderConstantI(pDevice, This->contained_vs_consts_i[i], IWineD3DDevice_SetVertexShaderConstantI(device, This->contained_vs_consts_i[i],
This->vertexShaderConstantI + This->contained_vs_consts_i[i] * 4, 1); This->vertexShaderConstantI + This->contained_vs_consts_i[i] * 4, 1);
} }
for (i = 0; i < This->num_contained_vs_consts_b; ++i) for (i = 0; i < This->num_contained_vs_consts_b; ++i)
{ {
IWineD3DDevice_SetVertexShaderConstantB(pDevice, This->contained_vs_consts_b[i], IWineD3DDevice_SetVertexShaderConstantB(device, This->contained_vs_consts_b[i],
This->vertexShaderConstantB + This->contained_vs_consts_b[i], 1); This->vertexShaderConstantB + This->contained_vs_consts_b[i], 1);
} }
apply_lights(pDevice, This); apply_lights(device, This);
if (This->changed.pixelShader) IWineD3DDevice_SetPixelShader(pDevice, This->pixelShader); if (This->changed.pixelShader) IWineD3DDevice_SetPixelShader(device, This->pixelShader);
/* Pixel Shader Constants */ /* Pixel Shader Constants */
for (i = 0; i < This->num_contained_ps_consts_f; ++i) for (i = 0; i < This->num_contained_ps_consts_f; ++i)
{ {
IWineD3DDevice_SetPixelShaderConstantF(pDevice, This->contained_ps_consts_f[i], IWineD3DDevice_SetPixelShaderConstantF(device, This->contained_ps_consts_f[i],
This->pixelShaderConstantF + This->contained_ps_consts_f[i] * 4, 1); This->pixelShaderConstantF + This->contained_ps_consts_f[i] * 4, 1);
} }
for (i = 0; i < This->num_contained_ps_consts_i; ++i) for (i = 0; i < This->num_contained_ps_consts_i; ++i)
{ {
IWineD3DDevice_SetPixelShaderConstantI(pDevice, This->contained_ps_consts_i[i], IWineD3DDevice_SetPixelShaderConstantI(device, This->contained_ps_consts_i[i],
This->pixelShaderConstantI + This->contained_ps_consts_i[i] * 4, 1); This->pixelShaderConstantI + This->contained_ps_consts_i[i] * 4, 1);
} }
for (i = 0; i < This->num_contained_ps_consts_b; ++i) for (i = 0; i < This->num_contained_ps_consts_b; ++i)
{ {
IWineD3DDevice_SetPixelShaderConstantB(pDevice, This->contained_ps_consts_b[i], IWineD3DDevice_SetPixelShaderConstantB(device, This->contained_ps_consts_b[i],
This->pixelShaderConstantB + This->contained_ps_consts_b[i], 1); This->pixelShaderConstantB + This->contained_ps_consts_b[i], 1);
} }
/* Render */ /* Render */
for (i = 0; i < This->num_contained_render_states; ++i) for (i = 0; i < This->num_contained_render_states; ++i)
{ {
IWineD3DDevice_SetRenderState(pDevice, This->contained_render_states[i], IWineD3DDevice_SetRenderState(device, This->contained_render_states[i],
This->renderState[This->contained_render_states[i]]); This->renderState[This->contained_render_states[i]]);
} }
...@@ -946,7 +946,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) ...@@ -946,7 +946,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
DWORD stage = This->contained_tss_states[i].stage; DWORD stage = This->contained_tss_states[i].stage;
DWORD state = This->contained_tss_states[i].state; DWORD state = This->contained_tss_states[i].state;
IWineD3DDevice_SetTextureStageState(pDevice, stage, state, This->textureState[stage][state]); IWineD3DDevice_SetTextureStageState(device, stage, state, This->textureState[stage][state]);
} }
/* Sampler states */ /* Sampler states */
...@@ -957,12 +957,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) ...@@ -957,12 +957,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
DWORD value = This->samplerState[stage][state]; DWORD value = This->samplerState[stage][state];
if (stage >= MAX_FRAGMENT_SAMPLERS) stage += WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS; if (stage >= MAX_FRAGMENT_SAMPLERS) stage += WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS;
IWineD3DDevice_SetSamplerState(pDevice, stage, state, value); IWineD3DDevice_SetSamplerState(device, stage, state, value);
} }
for (i = 0; i < This->num_contained_transform_states; ++i) for (i = 0; i < This->num_contained_transform_states; ++i)
{ {
IWineD3DDevice_SetTransform(pDevice, This->contained_transform_states[i], IWineD3DDevice_SetTransform(device, This->contained_transform_states[i],
&This->transforms[This->contained_transform_states[i]]); &This->transforms[This->contained_transform_states[i]]);
} }
...@@ -974,40 +974,40 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) ...@@ -974,40 +974,40 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
if (This->changed.indices) if (This->changed.indices)
{ {
IWineD3DDevice_SetIndexBuffer(pDevice, This->pIndexData, This->IndexFmt); IWineD3DDevice_SetIndexBuffer(device, This->pIndexData, This->IndexFmt);
IWineD3DDevice_SetBaseVertexIndex(pDevice, This->baseVertexIndex); IWineD3DDevice_SetBaseVertexIndex(device, This->baseVertexIndex);
} }
if (This->changed.vertexDecl && This->vertexDecl) if (This->changed.vertexDecl && This->vertexDecl)
{ {
IWineD3DDevice_SetVertexDeclaration(pDevice, This->vertexDecl); IWineD3DDevice_SetVertexDeclaration(device, This->vertexDecl);
} }
if (This->changed.material) if (This->changed.material)
{ {
IWineD3DDevice_SetMaterial(pDevice, &This->material); IWineD3DDevice_SetMaterial(device, &This->material);
} }
if (This->changed.viewport) if (This->changed.viewport)
{ {
IWineD3DDevice_SetViewport(pDevice, &This->viewport); IWineD3DDevice_SetViewport(device, &This->viewport);
} }
if (This->changed.scissorRect) if (This->changed.scissorRect)
{ {
IWineD3DDevice_SetScissorRect(pDevice, &This->scissorRect); IWineD3DDevice_SetScissorRect(device, &This->scissorRect);
} }
map = This->changed.streamSource; map = This->changed.streamSource;
for (i = 0; map; map >>= 1, ++i) for (i = 0; map; map >>= 1, ++i)
{ {
if (map & 1) IWineD3DDevice_SetStreamSource(pDevice, i, This->streamSource[i], 0, This->streamStride[i]); if (map & 1) IWineD3DDevice_SetStreamSource(device, i, This->streamSource[i], 0, This->streamStride[i]);
} }
map = This->changed.streamFreq; map = This->changed.streamFreq;
for (i = 0; map; map >>= 1, ++i) for (i = 0; map; map >>= 1, ++i)
{ {
if (map & 1) IWineD3DDevice_SetStreamSourceFreq(pDevice, i, This->streamFreq[i] | This->streamFlags[i]); if (map & 1) IWineD3DDevice_SetStreamSourceFreq(device, i, This->streamFreq[i] | This->streamFlags[i]);
} }
map = This->changed.textures; map = This->changed.textures;
...@@ -1018,7 +1018,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) ...@@ -1018,7 +1018,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
if (!(map & 1)) continue; if (!(map & 1)) continue;
stage = i < MAX_FRAGMENT_SAMPLERS ? i : WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS; stage = i < MAX_FRAGMENT_SAMPLERS ? i : WINED3DVERTEXTEXTURESAMPLER0 + i - MAX_FRAGMENT_SAMPLERS;
IWineD3DDevice_SetTexture(pDevice, stage, This->textures[i]); IWineD3DDevice_SetTexture(device, stage, This->textures[i]);
} }
map = This->changed.clipplane; map = This->changed.clipplane;
...@@ -1032,7 +1032,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) ...@@ -1032,7 +1032,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
clip[1] = This->clipplane[i][1]; clip[1] = This->clipplane[i][1];
clip[2] = This->clipplane[i][2]; clip[2] = This->clipplane[i][2];
clip[3] = This->clipplane[i][3]; clip[3] = This->clipplane[i][3];
IWineD3DDevice_SetClipPlane(pDevice, i, clip); IWineD3DDevice_SetClipPlane(device, i, clip);
} }
This->device->stateBlock->lowest_disabled_stage = MAX_TEXTURES - 1; This->device->stateBlock->lowest_disabled_stage = MAX_TEXTURES - 1;
...@@ -1044,7 +1044,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) ...@@ -1044,7 +1044,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
break; break;
} }
} }
TRACE("(%p) : Applied state block %p ------------------^\n", This, pDevice); TRACE("(%p) : Applied state block %p ------------------^\n", This, device);
return WINED3D_OK; return WINED3D_OK;
} }
...@@ -1052,8 +1052,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) ...@@ -1052,8 +1052,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock* iface) { static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock* iface) {
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface; IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
IWineD3DDevice *device = (IWineD3DDevice *)This->device; IWineD3DDevice *device = (IWineD3DDevice *)This->device;
IWineD3DDeviceImpl *ThisDevice = (IWineD3DDeviceImpl *)device; IWineD3DDeviceImpl *device_impl = (IWineD3DDeviceImpl *)device;
const struct wined3d_gl_info *gl_info = &ThisDevice->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device_impl->adapter->gl_info;
union { union {
WINED3DLINEPATTERN lp; WINED3DLINEPATTERN lp;
DWORD d; DWORD d;
...@@ -1070,7 +1070,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat ...@@ -1070,7 +1070,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
/* Note this may have a large overhead but it should only be executed /* Note this may have a large overhead but it should only be executed
once, in order to initialize the complete state of the device and once, in order to initialize the complete state of the device and
all opengl equivalents */ all opengl equivalents */
TRACE("(%p) -----------------------> Setting up device defaults... %p\n", This, ThisDevice); TRACE("(%p) -----------------------> Setting up device defaults... %p\n", This, device);
/* TODO: make a special stateblock type for the primary stateblock (it never gets applied so it doesn't need a real type) */ /* TODO: make a special stateblock type for the primary stateblock (it never gets applied so it doesn't need a real type) */
This->blockType = WINED3DSBT_INIT; This->blockType = WINED3DSBT_INIT;
...@@ -1083,7 +1083,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat ...@@ -1083,7 +1083,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
TRACE("Render states\n"); TRACE("Render states\n");
/* Render states: */ /* Render states: */
if (ThisDevice->auto_depth_stencil) if (device_impl->auto_depth_stencil)
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, WINED3DZB_TRUE); IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, WINED3DZB_TRUE);
else else
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, WINED3DZB_FALSE); IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE, WINED3DZB_FALSE);
......
...@@ -145,15 +145,14 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface ...@@ -145,15 +145,14 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface
return hr; return hr;
} }
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3DDevice**ppDevice) { HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3DDevice **device)
{
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface; IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
*ppDevice = (IWineD3DDevice *)This->device; *device = (IWineD3DDevice *)This->device;
IWineD3DDevice_AddRef(*device);
/* Note Calling this method will increase the internal reference count TRACE("(%p) : returning %p\n", This, *device);
on the IDirect3DDevice9 interface. */
IWineD3DDevice_AddRef(*ppDevice);
TRACE("(%p) : returning %p\n", This, *ppDevice);
return WINED3D_OK; return WINED3D_OK;
} }
......
...@@ -2602,7 +2602,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *ifac ...@@ -2602,7 +2602,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *ifac
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface,
WINED3DDISPLAYMODE *pMode) DECLSPEC_HIDDEN; WINED3DDISPLAYMODE *pMode) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface,
IWineD3DDevice **ppDevice) DECLSPEC_HIDDEN; IWineD3DDevice **device) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface,
WINED3DPRESENT_PARAMETERS *pPresentationParameters) DECLSPEC_HIDDEN; WINED3DPRESENT_PARAMETERS *pPresentationParameters) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment