From fc4563621514e6461c1be9fc9666a8373e8c73bf Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 30 Apr 2023 10:57:28 -0400 Subject: [PATCH] - remove `vid_gpuswitch` and all associated handling --- source/common/platform/win32/hardware.cpp | 35 ----------------------- wadsrc/static/menudef.txt | 11 ------- 2 files changed, 46 deletions(-) diff --git a/source/common/platform/win32/hardware.cpp b/source/common/platform/win32/hardware.cpp index 1933bb521..4aec98da8 100644 --- a/source/common/platform/win32/hardware.cpp +++ b/source/common/platform/win32/hardware.cpp @@ -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()) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index aa0d379a4..b1b496f75 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -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"