mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-04-12 03:02:33 +02:00
[d3d9] Skip presenting if D3D9Swapchain has no associated window
This commit is contained in:
parent
175772944c
commit
9c898bd269
@ -172,6 +172,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_lastDialog = m_dialog;
|
m_lastDialog = m_dialog;
|
||||||
|
|
||||||
|
if (m_window == nullptr)
|
||||||
|
return D3D_OK;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
const bool useGDIFallback = m_partialCopy && !HasFrontBuffer();
|
const bool useGDIFallback = m_partialCopy && !HasFrontBuffer();
|
||||||
if (useGDIFallback)
|
if (useGDIFallback)
|
||||||
@ -994,6 +997,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
void D3D9SwapChainEx::UpdateWindowCtx() {
|
void D3D9SwapChainEx::UpdateWindowCtx() {
|
||||||
|
if (m_window == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!m_presenters.count(m_window)) {
|
if (!m_presenters.count(m_window)) {
|
||||||
auto res = m_presenters.emplace(
|
auto res = m_presenters.emplace(
|
||||||
std::piecewise_construct,
|
std::piecewise_construct,
|
||||||
@ -1334,10 +1340,10 @@ namespace dxvk {
|
|||||||
|| dstRect.right - dstRect.left != LONG(width)
|
|| dstRect.right - dstRect.left != LONG(width)
|
||||||
|| dstRect.bottom - dstRect.top != LONG(height);
|
|| dstRect.bottom - dstRect.top != LONG(height);
|
||||||
|
|
||||||
bool recreate =
|
bool recreate = m_wctx != nullptr
|
||||||
m_wctx->presenter == nullptr
|
&& (m_wctx->presenter == nullptr
|
||||||
|| m_wctx->presenter->info().imageExtent.width != width
|
|| m_wctx->presenter->info().imageExtent.width != width
|
||||||
|| m_wctx->presenter->info().imageExtent.height != height;
|
|| m_wctx->presenter->info().imageExtent.height != height);
|
||||||
|
|
||||||
m_swapchainExtent = { width, height };
|
m_swapchainExtent = { width, height };
|
||||||
m_dstRect = dstRect;
|
m_dstRect = dstRect;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user