From 791bd50ea7f1c7e974a7ca0d32c7eac1d6af8c40 Mon Sep 17 00:00:00 2001 From: tx00100xt Date: Tue, 7 Nov 2023 10:46:02 +0300 Subject: [PATCH] Revert commit 9f66ce03da31290112d2ef2e923070c1afa75690 --- SamTFE/Sources/Engine/Graphics/GfxLibrary.cpp | 22 +++++++------------ SamTSE/Sources/Engine/Graphics/GfxLibrary.cpp | 22 +++++++------------ 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/SamTFE/Sources/Engine/Graphics/GfxLibrary.cpp b/SamTFE/Sources/Engine/Graphics/GfxLibrary.cpp index 864ffceb..3f7da38f 100644 --- a/SamTFE/Sources/Engine/Graphics/GfxLibrary.cpp +++ b/SamTFE/Sources/Engine/Graphics/GfxLibrary.cpp @@ -1533,21 +1533,15 @@ BOOL CGfxLibrary::StartDisplayMode( enum GfxAPIType eAPI, INDEX iAdapter, PIX pi else if (eAPI == GAT_VK) { #ifdef PLATFORM_WIN32 - PIX pixCurrentSizeI = ::GetSystemMetrics(SM_CXSCREEN); - PIX pixCurrentSizeJ = ::GetSystemMetrics(SM_CYSCREEN); - if ( (pixCurrentSizeI == pixSizeI) && (pixCurrentSizeJ == pixSizeJ) ) { - // Nothing, because the resolution does not need to be changed + // disable multimonitor support if it can interfere with Vulkan + MonitorsOff(); + if( bFullScreen) { + // set windows mode to fit same size + bSuccess = CDS_SetMode( pixSizeI, pixSizeJ, eColorDepth); + if( !bSuccess) return FALSE; } else { - // disable multimonitor support if it can interfere with Vulkan - MonitorsOff(); - if( bFullScreen) { - // set windows mode to fit same size - bSuccess = CDS_SetMode( pixSizeI, pixSizeJ, eColorDepth); - if( !bSuccess) return FALSE; - } else { - // reset windows mode - CDS_ResetMode(); - } + // reset windows mode + CDS_ResetMode(); } #endif // startup Vulkan diff --git a/SamTSE/Sources/Engine/Graphics/GfxLibrary.cpp b/SamTSE/Sources/Engine/Graphics/GfxLibrary.cpp index 864ffceb..3f7da38f 100644 --- a/SamTSE/Sources/Engine/Graphics/GfxLibrary.cpp +++ b/SamTSE/Sources/Engine/Graphics/GfxLibrary.cpp @@ -1533,21 +1533,15 @@ BOOL CGfxLibrary::StartDisplayMode( enum GfxAPIType eAPI, INDEX iAdapter, PIX pi else if (eAPI == GAT_VK) { #ifdef PLATFORM_WIN32 - PIX pixCurrentSizeI = ::GetSystemMetrics(SM_CXSCREEN); - PIX pixCurrentSizeJ = ::GetSystemMetrics(SM_CYSCREEN); - if ( (pixCurrentSizeI == pixSizeI) && (pixCurrentSizeJ == pixSizeJ) ) { - // Nothing, because the resolution does not need to be changed + // disable multimonitor support if it can interfere with Vulkan + MonitorsOff(); + if( bFullScreen) { + // set windows mode to fit same size + bSuccess = CDS_SetMode( pixSizeI, pixSizeJ, eColorDepth); + if( !bSuccess) return FALSE; } else { - // disable multimonitor support if it can interfere with Vulkan - MonitorsOff(); - if( bFullScreen) { - // set windows mode to fit same size - bSuccess = CDS_SetMode( pixSizeI, pixSizeJ, eColorDepth); - if( !bSuccess) return FALSE; - } else { - // reset windows mode - CDS_ResetMode(); - } + // reset windows mode + CDS_ResetMode(); } #endif // startup Vulkan