Skip to content

Commit

Permalink
Added fullscreen for different resolutions for Vulkan (Win)
Browse files Browse the repository at this point in the history
Added fullscreen for resolutions other than Desktop resolution
for Vulkan (Windows). Everything worked in Linux anyway. Issue #33
  • Loading branch information
tx00100xt committed Oct 27, 2023
1 parent df2b2d8 commit e85349a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions SamTFE/Sources/Engine/Graphics/GfxLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,18 @@ BOOL CGfxLibrary::StartDisplayMode( enum GfxAPIType eAPI, INDEX iAdapter, PIX pi
#ifdef SE1_VULKAN
else if (eAPI == GAT_VK)
{
// 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();
}
// startup Vulkan

bSuccess = InitDriver_Vulkan();
if (!bSuccess) {
CPrintF("Vulkan error: Init Driver Vulkan Error!\n");
Expand Down
12 changes: 12 additions & 0 deletions SamTSE/Sources/Engine/Graphics/GfxLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,18 @@ BOOL CGfxLibrary::StartDisplayMode( enum GfxAPIType eAPI, INDEX iAdapter, PIX pi
#ifdef SE1_VULKAN
else if (eAPI == GAT_VK)
{
// 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();
}
// startup Vulkan

bSuccess = InitDriver_Vulkan();
if (!bSuccess) {
CPrintF("Vulkan error: Init Driver Vulkan Error!\n");
Expand Down

0 comments on commit e85349a

Please sign in to comment.