Browse Source

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;

AzaezelX 5 years ago
parent
commit
f6a2149dd1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Templates/BaseGame/game/data/ui/guis/optionsMenu.cs

+ 2 - 2
Templates/BaseGame/game/data/ui/guis/optionsMenu.cs

@@ -206,7 +206,7 @@ function OptionsMenu::populateDisplaySettingsList(%this)
    OptionDescription.setText("");
    OptionDescription.setText("");
    
    
    %resolutionList = getScreenResolutionList();
    %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("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("Fullscreen", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo($pref::Video::FullScreen));
    OptionsMenuSettingsList.addOptionRow("VSync", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync));
    OptionsMenuSettingsList.addOptionRow("VSync", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync));
@@ -226,7 +226,7 @@ function OptionsMenu::applyDisplaySettings(%this)
 {
 {
    %newAdapter    = GraphicsMenuDriver.getText();
    %newAdapter    = GraphicsMenuDriver.getText();
 	%numAdapters   = GFXInit::getAdapterCount();
 	%numAdapters   = GFXInit::getAdapterCount();
-	%newDevice     = $pref::Video::displayDevice;
+	%newDevice     = OptionsMenuSettingsList.getCurrentOption(0);
 							
 							
 	for( %i = 0; %i < %numAdapters; %i ++ )
 	for( %i = 0; %i < %numAdapters; %i ++ )
 	{
 	{