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;
This commit is contained in:
AzaezelX 2020-06-03 01:59:48 -05:00 committed by Areloch
parent 81a4e47235
commit f6a2149dd1

View file

@ -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 ++ )
{