Hello.
Al Tobey wrote:
According to MSDN, this just sets a pointer to the creation parameters. The attached patch makes this function work, but I'm not sure if returning a pointer to the original parameters is the right approach or if they should be copied first.
This patch makes a bunch of the Ogre3d demos work, which are great for testing since you can run the same demo in OpenGL, D3D9, and D3D7 modes.
The attached version incorporates all of the feedback from wine-devel and should be ready to go.
-Al Tobey
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index b057a36..f1bfc01 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6129,26 +6129,23 @@ IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; /** FIXME: always true at the moment **/ if(bEnableDialogs == FALSE) { FIXME("(%p) Dialogs cannot be disabled yet\n", This); } return D3D_OK; }
HRESULT WINAPI IWineD3DDeviceImpl_GetCreationParameters(IWineD3DDevice *iface, D3DDEVICE_CREATION_PARAMETERS *pParameters) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
- FIXME("(%p) : stub\n", This);
You should change it to TRACE instead of deleting debug messages.
- /* Setup some reasonable defaults */
- pParameters->AdapterOrdinal = 0; /* always for now */
- pParameters->DeviceType = D3DDEVTYPE_HAL; /* always for now */
- pParameters->hFocusWindow = 0;
- pParameters->BehaviorFlags =0;
- if (This == NULL || pParameters == NULL)
You really shouldn't check if This is NULL here. I'm sure this patch won't be applied with this.
return D3DERR_INVALIDCALL;
- memcpy(pParameters, &This->createParms, sizeof(D3DDEVICE_CREATION_PARAMETERS)); return D3D_OK;
}
void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp) { IWineD3DSwapChain *swapchain; HRESULT hrc = D3D_OK;
TRACE("Relaying to swapchain\n");
Thanks, Jacek