From f6a2149dd1b4221eb8d0f24fc780498d435bbfcc Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Wed, 3 Jun 2020 01:59:48 -0500 Subject: [PATCH] tempfix: corrects the display api entry... in the options menu so that it properly reflects what's active/selected for restart, and more importantly saves the pref. Important Note: down the line we'd discussed treating options similar to the key remap system where it'd be a map of opt[varname]=varstate; --- Templates/BaseGame/game/data/ui/guis/optionsMenu.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/BaseGame/game/data/ui/guis/optionsMenu.cs b/Templates/BaseGame/game/data/ui/guis/optionsMenu.cs index 45c331e9e..a87447a2f 100644 --- a/Templates/BaseGame/game/data/ui/guis/optionsMenu.cs +++ b/Templates/BaseGame/game/data/ui/guis/optionsMenu.cs @@ -206,7 +206,7 @@ function OptionsMenu::populateDisplaySettingsList(%this) OptionDescription.setText(""); %resolutionList = getScreenResolutionList(); - OptionsMenuSettingsList.addOptionRow("Display API", "D3D11\tOpenGL", false, "", -1, -30, true, "The display API used for rendering.", getDisplayDeviceInformation()); + OptionsMenuSettingsList.addOptionRow("Display API", "D3D11\tOpenGL", false, "", -1, -30, true, "The display API used for rendering.", $pref::Video::displayDevice); OptionsMenuSettingsList.addOptionRow("Resolution", %resolutionList, false, "", -1, -30, true, "Resolution of the game window", _makePrettyResString( $pref::Video::mode )); OptionsMenuSettingsList.addOptionRow("Fullscreen", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo($pref::Video::FullScreen)); OptionsMenuSettingsList.addOptionRow("VSync", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync)); @@ -226,7 +226,7 @@ function OptionsMenu::applyDisplaySettings(%this) { %newAdapter = GraphicsMenuDriver.getText(); %numAdapters = GFXInit::getAdapterCount(); - %newDevice = $pref::Video::displayDevice; + %newDevice = OptionsMenuSettingsList.getCurrentOption(0); for( %i = 0; %i < %numAdapters; %i ++ ) {