From e5fcb331df10d39b0d55cb49600dd4307a0d5c0e Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 30 Apr 2023 10:38:41 -0400 Subject: [PATCH] - 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 --- src/common/platform/win32/hardware.cpp | 34 -------------------------- wadsrc/static/menudef.txt | 11 --------- 2 files changed, 45 deletions(-) diff --git a/src/common/platform/win32/hardware.cpp b/src/common/platform/win32/hardware.cpp index 1933bb521e..16123fdd96 100644 --- a/src/common/platform/win32/hardware.cpp +++ b/src/common/platform/win32/hardware.cpp @@ -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()) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index dd5a6d9fcf..6af3dc8a0f 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -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"