0.9.31 not suitable for gaming

Pavel Troller patrol at sinus.cz
Wed Feb 21 10:38:51 CST 2007


> On 21/02/07, Pavel Troller <patrol at sinus.cz> wrote:
> >I'm a bit confusd because I failed to find the code for
> >D3DCB_CreateAdditionalSwapChain(), I found only its call in device.c and 
> >its
> >definition in wined3d_interface.h.
> That's D3D7CB_CreateAdditionalSwapChain() in dlls/ddraw/ddraw.c
> 
Hi!
  OK, thanks, found it now.
  I've modified its code by inserting many traces:

{
    ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, device);
    IParentImpl *object = NULL;
    HRESULT res = D3D_OK;
    IWineD3DSwapChain *swapchain;
    TRACE("(%p) call back\n", device);
    TRACE("$$$$ 2672\n");
    object = HeapAlloc(GetProcessHeap(),  HEAP_ZERO_MEMORY, sizeof(IParentImpl));
    TRACE("$$$$ 2674\n");
    if (NULL == object)
    {
        FIXME("Allocation of memory failed\n");
        *ppSwapChain = NULL;
        return DDERR_OUTOFVIDEOMEMORY;
    }
    TRACE("$$$$ 2681\n");
    ICOM_INIT_INTERFACE(object, IParent, IParent_Vtbl);
    TRACE("$$$$ 2683\n");
    object->ref = 1;

    res = IWineD3DDevice_CreateAdditionalSwapChain(This->wineD3DDevice,
                                                   pPresentationParameters,
                                                   &swapchain,
                                                   (IUnknown*) ICOM_INTERFACE(object, IParent),
                                                   D3D7CB_CreateRenderTarget,
                                                   D3D7CB_CreateDepthStencilSurface);
    TRACE("$$$$ 2692\n");
    if (res != D3D_OK)
    {
        FIXME("(%p) call to IWineD3DDevice_CreateAdditionalSwapChain failed\n", This);
        HeapFree(GetProcessHeap(), 0 , object);
        *ppSwapChain = NULL;
    }
    else
    {
        TRACE("2701\n");
        *ppSwapChain = swapchain;
        object->child = (IUnknown *) swapchain;
    }
    TRACE("$$$$ Returning\n");
    return res;
}

  The last trace which appeared in the log is 2683, so
IWineD3DDevice_CreateAdditionalSwapChain() didn't return. I'm going bananas
from those names; where the hell this one grows :-) ? grep, as obvious, shows
its calls only.
                  With regards, Pavel Troller



More information about the wine-devel mailing list