display a warning reminder that client restart is needed when changing display method

This commit is contained in:
zeromus 2015-08-30 08:44:46 -05:00
parent 46d847875d
commit d9b765ac89
2 changed files with 13 additions and 1 deletions

View File

@ -2211,11 +2211,16 @@ namespace BizHawk.Client.EmuHawk
private void DisplayConfigMenuItem_Click(object sender, EventArgs e)
{
var result = new config.DisplayConfigLite().ShowDialog();
var window = new config.DisplayConfigLite();
var result = window.ShowDialog();
if (result == DialogResult.OK)
{
FrameBufferResized();
SynchChrome();
if (window.NeedReset)
{
GlobalWin.OSD.AddMessage("Restart program for changed settings");
}
}
}

View File

@ -14,7 +14,10 @@ namespace BizHawk.Client.EmuHawk.config
{
public partial class DisplayConfigLite : Form
{
public bool NeedReset;
string PathSelection;
public DisplayConfigLite()
{
InitializeComponent();
@ -139,6 +142,7 @@ namespace BizHawk.Client.EmuHawk.config
int.TryParse(txtCustomARWidth.Text, out Global.Config.DispCustomUserARWidth);
int.TryParse(txtCustomARHeight.Text, out Global.Config.DispCustomUserARHeight);
var oldDisplayMethod = Global.Config.DispMethod;
if(rbOpenGL.Checked)
Global.Config.DispMethod = Config.EDispMethod.OpenGL;
if(rbGDIPlus.Checked)
@ -146,6 +150,9 @@ namespace BizHawk.Client.EmuHawk.config
if(rbD3D9.Checked)
Global.Config.DispMethod = Config.EDispMethod.SlimDX9;
if (oldDisplayMethod != Global.Config.DispMethod)
NeedReset = true;
Global.Config.DispUserFilterPath = PathSelection;
GlobalWin.DisplayManager.RefreshUserShader();