- remove `vid_gpuswitch` and all its handling; it is only as of now useful in old unsupported versions of Windows 7/8/10 which are no longer supported

This commit is contained in:
Rachael Alexanderson 2023-04-30 10:38:41 -04:00
parent 993d44c33b
commit e5fcb331df
2 changed files with 0 additions and 45 deletions

View File

@ -61,33 +61,6 @@ 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 +75,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

@ -886,13 +886,6 @@ OptionValue VanillaTrans
3.0, "$OPTVAL_VTAVANILLA"
}
OptionValue GPUSwitch
{
0.0, "$OPTVAL_DEFAULT"
1.0, "$OPTVAL_DEDICATED"
2.0, "$OPTVAL_INTEGRATED"
}
OptionValue PreferBackend
{
0, "$OPTVAL_OPENGL"
@ -2284,10 +2277,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"