Fix crash in fullscreen mode

Set a backbuffer format, since UNKNOWN is only accepted in windowed mode
This commit is contained in:
Anthony 2021-03-18 20:53:42 +13:00
parent 6db6256e45
commit 9d18a16370
1 changed files with 5 additions and 2 deletions

View File

@ -2191,8 +2191,11 @@ static void SetupPresentationParameters
params.SwapEffect = D3DSWAPEFFECT_COPY;
// Any backbuffer format should do, since we render to a separate xbox backbuffer
// Rather than directly to the host backbuffer
params.BackBufferFormat = D3DFMT_UNKNOWN;
// We need to specify something to support fullscreen exclusive mode
// Take the current displaymode format
D3DDISPLAYMODE D3DDisplayMode;
g_pDirect3D->GetAdapterDisplayMode(g_EmuCDPD.Adapter, &D3DDisplayMode);
params.BackBufferFormat = D3DDisplayMode.Format;
params.PresentationInterval = g_XBVideo.bVSync ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE;
g_Xbox_PresentationInterval_Default = pXboxPresentationParameters->PresentationInterval;