Previous viewport fix only works for full screen applications as we

didn't change the back buffer size information until after copying the
presentation parameters, so when setting up the viewport the
backbufferwidth/height was 0. Moved the copy until after it has been
corrected.
This commit is contained in:
Jason Edmeades 2003-05-15 04:16:16 +00:00 committed by Alexandre Julliard
parent 39aab38006
commit 1e9689e487
1 changed files with 14 additions and 11 deletions

View File

@ -280,6 +280,9 @@ HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 iface,
case D3DFMT_DXT3:
case D3DFMT_DXT4:
case D3DFMT_DXT5:
case D3DFMT_X8L8V8U8:
case D3DFMT_L6V5U5:
case D3DFMT_V8U8:
/* Since we do not support these formats right now, don't pretend to. */
return D3DERR_NOTAVAILABLE;
default:
@ -478,11 +481,7 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
*ppReturnedDeviceInterface = (LPDIRECT3DDEVICE8)object;
/* Initialize settings */
memcpy(&object->PresentParms, pPresentationParameters, sizeof(D3DPRESENT_PARAMETERS));
object->PresentParms.BackBufferCount = 1; /* Opengl only supports one? */
pPresentationParameters->BackBufferCount = 1;
object->adapterNo = Adapter;
object->devType = DeviceType;
@ -575,6 +574,10 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
}
}
/* Save the presentation parms now filled in correctly */
memcpy(&object->PresentParms, pPresentationParameters, sizeof(D3DPRESENT_PARAMETERS));
IDirect3DDevice8Impl_CreateRenderTarget((LPDIRECT3DDEVICE8) object,
pPresentationParameters->BackBufferWidth,
pPresentationParameters->BackBufferHeight,