1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-27 22:54:16 +01:00

[dxgi] Replaced ugly pointer cast by more reasonable code

This commit is contained in:
Philip Rebohle 2018-04-12 00:45:23 +02:00
parent ef4a3c5bfc
commit 015e67fc7c
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -392,10 +392,12 @@ namespace dxvk {
m_output = static_cast<DxgiOutput*>(pTarget);
if (m_output == nullptr) {
if (FAILED(GetContainingOutput(reinterpret_cast<IDXGIOutput**>(&m_output)))) {
Com<IDXGIOutput> output;
if (FAILED(GetContainingOutput(&output))) {
Logger::err("DxgiSwapChain: Failed to enter fullscreen mode: Cannot query containing output");
return E_FAIL;
}
m_output = static_cast<DxgiOutput*>(output.ptr());
}
// Update swap chain description