On Wed, Aug 5, 2009 at 7:51 PM, Stefan Dösinger <stefandoesinger@gmx.at> wrote:
Am Wednesday 05 August 2009 18:58:42 schrieb Johan Gill:
> On Wed, Jul 29, 2009 at 11:55 PM, Johan Gill <johan.gill@gmail.com> wrote:
> > This patch fixes bug 17215. Since the patch was seemingly dropped, I made
> > some test improvements and resubmit it.
> >
> > The tests pass on Windows XP, and of course Wine.
> >
> > Suggested changelog:
> > In DirectDraw fullscreen mode, make sure the fullscreen window is resized
> > when the display mode changes
Sorry, I haven't noticed the patch earlier. Please nadd the component the
patch addresses in topic, for example "ddraw: Resize fullscreen win..." -
that makes them more visible for me when I look for ddraw/d3d related
patches.

As for the patch itself WineD3D.dll already has similar window resize code. Do
you know why it doesn't resize the window, and if we can make wined3d do this
job?


There is IWineD3DDeviceImpl_SetupFullscreenWindow, but that one is not exported so it can't be called from ddraw as it is.

Calling it from within IWineD3DDevice_SetDisplayMode seems troublesome since the hwnd to use is not always available in the WineD3DDevice. See for instance this example from CreateSwapChain:

    /* Setup hwnd we are using, plus which display this equates to */
    object->win_handle = pPresentationParameters->hDeviceWindow;
    if (!object->win_handle) {
        object->win_handle = This->createParms.hFocusWindow;
    }
    if(!pPresentationParameters->Windowed && object->win_handle) {
        IWineD3DDeviceImpl_SetupFullscreenWindow(iface, object->win_handle,
                                                 pPresentationParameters->BackBufferWidth,
                                                 pPresentationParameters->BackBufferHeight);

/Johan Gill