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:
parent
39aab38006
commit
1e9689e487
|
@ -273,13 +273,16 @@ HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat (LPDIRECT3D8 iface,
|
||||||
FIXME("(%p)->(Adptr:%d, DevType: %x, AdptFmt: %d, Use: %ld, ResTyp: %x, CheckFmt: %d)\n", This, Adapter, DeviceType,
|
FIXME("(%p)->(Adptr:%d, DevType: %x, AdptFmt: %d, Use: %ld, ResTyp: %x, CheckFmt: %d)\n", This, Adapter, DeviceType,
|
||||||
AdapterFormat, Usage, RType, CheckFormat);
|
AdapterFormat, Usage, RType, CheckFormat);
|
||||||
switch(CheckFormat) {
|
switch(CheckFormat) {
|
||||||
case D3DFMT_UYVY:
|
case D3DFMT_UYVY:
|
||||||
case D3DFMT_YUY2:
|
case D3DFMT_YUY2:
|
||||||
case D3DFMT_DXT1:
|
case D3DFMT_DXT1:
|
||||||
case D3DFMT_DXT2:
|
case D3DFMT_DXT2:
|
||||||
case D3DFMT_DXT3:
|
case D3DFMT_DXT3:
|
||||||
case D3DFMT_DXT4:
|
case D3DFMT_DXT4:
|
||||||
case D3DFMT_DXT5:
|
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. */
|
/* Since we do not support these formats right now, don't pretend to. */
|
||||||
return D3DERR_NOTAVAILABLE;
|
return D3DERR_NOTAVAILABLE;
|
||||||
default:
|
default:
|
||||||
|
@ -478,11 +481,7 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
|
||||||
*ppReturnedDeviceInterface = (LPDIRECT3DDEVICE8)object;
|
*ppReturnedDeviceInterface = (LPDIRECT3DDEVICE8)object;
|
||||||
|
|
||||||
/* Initialize settings */
|
/* Initialize settings */
|
||||||
memcpy(&object->PresentParms, pPresentationParameters, sizeof(D3DPRESENT_PARAMETERS));
|
|
||||||
|
|
||||||
object->PresentParms.BackBufferCount = 1; /* Opengl only supports one? */
|
object->PresentParms.BackBufferCount = 1; /* Opengl only supports one? */
|
||||||
pPresentationParameters->BackBufferCount = 1;
|
|
||||||
|
|
||||||
object->adapterNo = Adapter;
|
object->adapterNo = Adapter;
|
||||||
object->devType = DeviceType;
|
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,
|
IDirect3DDevice8Impl_CreateRenderTarget((LPDIRECT3DDEVICE8) object,
|
||||||
pPresentationParameters->BackBufferWidth,
|
pPresentationParameters->BackBufferWidth,
|
||||||
pPresentationParameters->BackBufferHeight,
|
pPresentationParameters->BackBufferHeight,
|
||||||
|
|
Loading…
Reference in New Issue