- remove vid_gpuswitch and all associated handling

This commit is contained in:
Rachael Alexanderson 2023-04-30 10:57:28 -04:00
parent 7bb678bb7e
commit fc45636215
2 changed files with 0 additions and 46 deletions

View file

@ -58,36 +58,8 @@ IVideo *gl_CreateVideo();
void I_RestartRenderer();
int currentcanvas = -1;
int currentgpuswitch = -1;
bool changerenderer;
// Optimus/Hybrid switcher
CUSTOM_CVAR(Int, vid_gpuswitch, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
if (self != currentgpuswitch)
{
switch (self)
{
case 0:
Printf("Selecting default GPU...\n");
break;
case 1:
Printf("Selecting high-performance dedicated GPU...\n");
break;
case 2:
Printf("Selecting power-saving integrated GPU...\n");
break;
default:
Printf("Unknown option (%d) - falling back to 'default'\n", *vid_gpuswitch);
self = 0;
break;
}
Printf("You must restart " GAMENAME " for this change to take effect.\n");
}
}
void I_ShutdownGraphics ()
{
if (screen)
@ -102,13 +74,6 @@ void I_ShutdownGraphics ()
void I_InitGraphics ()
{
// todo: implement ATI version of this. this only works for nvidia notebooks, for now.
currentgpuswitch = vid_gpuswitch;
if (currentgpuswitch == 1)
_putenv("SHIM_MCCOMPAT=0x800000001"); // discrete
else if (currentgpuswitch == 2)
_putenv("SHIM_MCCOMPAT=0x800000000"); // integrated
// If the focus window is destroyed, it doesn't go back to the active window.
// (e.g. because the net pane was up, and a button on it had focus)
if (GetFocus() == NULL && GetActiveWindow() == mainwindow.GetHandle())

View file

@ -1674,13 +1674,6 @@ OptionValue MaxFps
200, "$OPTVAL_200FPS"
}
OptionValue GPUSwitch
{
0.0, "$OPTVAL_DEFAULT"
1.0, "$OPTVAL_DEDICATED"
2.0, "$OPTVAL_INTEGRATED"
}
OptionValue PreferBackend
{
0, "$OPTVAL_OPENGL"
@ -1700,10 +1693,6 @@ OptionMenu VideoModeMenu protected
{
Option "$VIDMNU_HIDPI", "vid_hidpi", "YesNo"
}
IfOption(Windows)
{
Option "$DSPLYMNU_GPUSWITCH", vid_gpuswitch, "GPUSwitch"
}
Option "$VIDMNU_FORCEASPECT", "vid_aspect", "ForceRatios"
Option "$VIDMNU_CROPASPECT", "vid_cropaspect", "CropAspect"