Skip to content

Commit

Permalink
Use the appropriate restart description.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed May 21, 2023
1 parent 7488622 commit 2fda2cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Func<bool> InitPanel(Widget panel)
s => WidgetUtils.TruncateText(s.Label, audioDeviceDropdown.UsableWidth, deviceFont));
audioDeviceDropdown.GetText = () => deviceLabel.Update(soundDevice);

var restartDesc = panel.Get("RESTART_REQUIRED_DESC");
var restartDesc = panel.Get("AUDIO_RESTART_REQUIRED_DESC");
restartDesc.IsVisible = () => soundDevice.Device != OriginalSoundDevice;

SettingsUtils.AdjustSettingsScrollPanelLayout(scrollPanel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public class DisplaySettingsLogic : ChromeLogic

[TranslationReference("fps")]
const string FrameLimiter = "checkbox-frame-limiter";

static readonly int OriginalVideoDisplay;
static readonly WindowMode OriginalGraphicsMode;
static readonly int2 OriginalGraphicsWindowedSize;
Expand Down Expand Up @@ -223,7 +224,7 @@ Func<bool> InitPanel(Widget panel)
var origHeightText = windowHeight.Text = ds.WindowedSize.Y.ToString();
windowHeight.Text = ds.WindowedSize.Y.ToString();

var restartDesc = panel.Get("RESTART_REQUIRED_DESC");
var restartDesc = panel.Get("VIDEO_RESTART_REQUIRED_DESC");
restartDesc.IsVisible = () => ds.Mode != OriginalGraphicsMode || ds.VideoDisplay != OriginalVideoDisplay || ds.GLProfile != OriginalGLProfile ||
(ds.Mode == WindowMode.Windowed && (origWidthText != windowWidth.Text || origHeightText != windowHeight.Text));

Expand Down

0 comments on commit 2fda2cb

Please sign in to comment.