1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[d3d9] Validate 0 valued back buffer dimensions for fullscreen mode

This commit is contained in:
WinterSnowfall 2024-10-04 20:39:32 +03:00 committed by Philip Rebohle
parent 6e0c048b88
commit 088cf45439

View File

@ -8152,6 +8152,12 @@ namespace dxvk {
" - Windowed: ", pPresentationParameters->Windowed ? "true" : "false", "\n",
" - Swap effect: ", pPresentationParameters->SwapEffect, "\n"));
if (!pPresentationParameters->Windowed &&
(pPresentationParameters->BackBufferWidth == 0
|| pPresentationParameters->BackBufferHeight == 0)) {
return D3DERR_INVALIDCALL;
}
if (backBufferFmt != D3D9Format::Unknown && !unlockedFormats) {
if (!IsSupportedBackBufferFormat(backBufferFmt)) {
Logger::err(str::format("D3D9DeviceEx::ResetSwapChain: Unsupported backbuffer format: ",