Skip to content

Commit

Permalink
- change menu option for 'vid_preferbackend'
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Dec 2, 2019
1 parent f501e1b commit 3269b61
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
16 changes: 13 additions & 3 deletions src/rendering/v_video.cpp
Expand Up @@ -114,9 +114,19 @@ CUSTOM_CVAR(Int, vid_preferbackend, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_N
// yet - I'm pretty sure it's going to require a lot of reinits and destructions to
// do it right without memory leaks

// 0 - OpenGL
// 1 - Vulkan
// 2 - SoftPoly v2
switch(self)
{
case 2:
Printf("Selecting SoftPoly backend...\n");
break;
#ifdef HAVE_VULKAN
case 1:
Printf("Selecting Vulkan backend...\n");
break;
#endif
default:
Printf("Selecting OpenGL backend...\n");
}

Printf("Changing the video backend requires a restart for " GAMENAME ".\n");
}
Expand Down
9 changes: 8 additions & 1 deletion wadsrc/static/menudef.txt
Expand Up @@ -885,6 +885,12 @@ OptionValue GPUSwitch
2.0, "$OPTVAL_INTEGRATED"
}

OptionValue PreferBackend
{
0, "$OPTVAL_OPENGL"
1, "$OPTVAL_VULKAN"
2, "$OPTVAL_SOFTPOLY"
}

OptionMenu "TrueColorOptions" protected
{
Expand Down Expand Up @@ -918,6 +924,8 @@ OptionMenu "VideoOptions" protected
Submenu "$GLMNU_TEXOPT", "GLTextureGLOptions"
Submenu "$GLMNU_DYNLIGHT", "GLLightOptions"
StaticText " "
Option "$DSPLYMNU_PREFERBACKEND", "vid_preferbackend", "PreferBackend"
StaticText " "
Slider "$DSPLYMNU_SCREENSIZE", "screenblocks", 3.0, 12.0, 1.0, 0

Slider "$DSPLYMNU_GAMMA", "Gamma", 0.75, 3.0, 0.05, 2
Expand Down Expand Up @@ -2787,7 +2795,6 @@ OptionMenu "vkoptions"
StaticText "$VK_WARNING"
StaticText "$VK_RESTART"
StaticText ""
Option "$VKMNU_ENABLE", "vid_enablevulkan", "OnOff"
TextField "$VKMNU_DEVICE", vk_device
Option "$VKMNU_HDR", "vk_hdr", "OnOff"
}

0 comments on commit 3269b61

Please sign in to comment.