rename DisplayConfigLite to DisplayConfig, it isn't very Lite anymore :)
This commit is contained in:
parent
8eff248d96
commit
8fcd9bb2a5
|
@ -270,11 +270,11 @@
|
||||||
<Compile Include="config\ControllerConfig\ControllerConfigPanel.Designer.cs">
|
<Compile Include="config\ControllerConfig\ControllerConfigPanel.Designer.cs">
|
||||||
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
|
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="config\DisplayConfigLite.cs">
|
<Compile Include="config\DisplayConfig.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="config\DisplayConfigLite.Designer.cs">
|
<Compile Include="config\DisplayConfig.Designer.cs">
|
||||||
<DependentUpon>DisplayConfigLite.cs</DependentUpon>
|
<DependentUpon>DisplayConfig.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="config\FileExtensionPreferences.cs">
|
<Compile Include="config\FileExtensionPreferences.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
|
@ -1328,8 +1328,8 @@
|
||||||
<EmbeddedResource Include="config\ControllerConfig\ControllerConfigPanel.resx">
|
<EmbeddedResource Include="config\ControllerConfig\ControllerConfigPanel.resx">
|
||||||
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
|
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="config\DisplayConfigLite.resx">
|
<EmbeddedResource Include="config\DisplayConfig.resx">
|
||||||
<DependentUpon>DisplayConfigLite.cs</DependentUpon>
|
<DependentUpon>DisplayConfig.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="config\FileExtensionPreferences.resx">
|
<EmbeddedResource Include="config\FileExtensionPreferences.resx">
|
||||||
|
|
|
@ -3061,7 +3061,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void DisplayConfigMenuItem_Click(object sender, EventArgs e)
|
private void DisplayConfigMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using var window = new DisplayConfigLite();
|
using var window = new DisplayConfig();
|
||||||
var result = window.ShowDialog();
|
var result = window.ShowDialog();
|
||||||
if (result == DialogResult.OK)
|
if (result == DialogResult.OK)
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,308 +1,308 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using BizHawk.Client.Common;
|
using BizHawk.Client.Common;
|
||||||
using BizHawk.Common;
|
using BizHawk.Common;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class DisplayConfigLite : Form
|
public partial class DisplayConfig : Form
|
||||||
{
|
{
|
||||||
public bool NeedReset;
|
public bool NeedReset;
|
||||||
|
|
||||||
string _pathSelection;
|
string _pathSelection;
|
||||||
|
|
||||||
public DisplayConfigLite()
|
public DisplayConfig()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
rbNone.Checked = Global.Config.TargetDisplayFilter == 0;
|
rbNone.Checked = Global.Config.TargetDisplayFilter == 0;
|
||||||
rbHq2x.Checked = Global.Config.TargetDisplayFilter == 1;
|
rbHq2x.Checked = Global.Config.TargetDisplayFilter == 1;
|
||||||
rbScanlines.Checked = Global.Config.TargetDisplayFilter == 2;
|
rbScanlines.Checked = Global.Config.TargetDisplayFilter == 2;
|
||||||
rbUser.Checked = Global.Config.TargetDisplayFilter == 3;
|
rbUser.Checked = Global.Config.TargetDisplayFilter == 3;
|
||||||
|
|
||||||
_pathSelection = Global.Config.DispUserFilterPath ?? "";
|
_pathSelection = Global.Config.DispUserFilterPath ?? "";
|
||||||
RefreshState();
|
RefreshState();
|
||||||
|
|
||||||
rbFinalFilterNone.Checked = Global.Config.DispFinalFilter == 0;
|
rbFinalFilterNone.Checked = Global.Config.DispFinalFilter == 0;
|
||||||
rbFinalFilterBilinear.Checked = Global.Config.DispFinalFilter == 1;
|
rbFinalFilterBilinear.Checked = Global.Config.DispFinalFilter == 1;
|
||||||
rbFinalFilterBicubic.Checked = Global.Config.DispFinalFilter == 2;
|
rbFinalFilterBicubic.Checked = Global.Config.DispFinalFilter == 2;
|
||||||
|
|
||||||
tbScanlineIntensity.Value = Global.Config.TargetScanlineFilterIntensity;
|
tbScanlineIntensity.Value = Global.Config.TargetScanlineFilterIntensity;
|
||||||
checkLetterbox.Checked = Global.Config.DispFixAspectRatio;
|
checkLetterbox.Checked = Global.Config.DispFixAspectRatio;
|
||||||
checkPadInteger.Checked = Global.Config.DispFixScaleInteger;
|
checkPadInteger.Checked = Global.Config.DispFixScaleInteger;
|
||||||
cbFullscreenHacks.Checked = Global.Config.DispFullscreenHacks;
|
cbFullscreenHacks.Checked = Global.Config.DispFullscreenHacks;
|
||||||
cbAutoPrescale.Checked = Global.Config.DispAutoPrescale;
|
cbAutoPrescale.Checked = Global.Config.DispAutoPrescale;
|
||||||
|
|
||||||
cbAlternateVsync.Checked = Global.Config.DispAlternateVsync;
|
cbAlternateVsync.Checked = Global.Config.DispAlternateVsync;
|
||||||
|
|
||||||
if (Global.Config.DispSpeedupFeatures == 2) rbDisplayFull.Checked = true;
|
if (Global.Config.DispSpeedupFeatures == 2) rbDisplayFull.Checked = true;
|
||||||
if (Global.Config.DispSpeedupFeatures == 1) rbDisplayMinimal.Checked = true;
|
if (Global.Config.DispSpeedupFeatures == 1) rbDisplayMinimal.Checked = true;
|
||||||
if (Global.Config.DispSpeedupFeatures == 0) rbDisplayAbsoluteZero.Checked = true;
|
if (Global.Config.DispSpeedupFeatures == 0) rbDisplayAbsoluteZero.Checked = true;
|
||||||
|
|
||||||
rbOpenGL.Checked = Global.Config.DispMethod == Config.EDispMethod.OpenGL;
|
rbOpenGL.Checked = Global.Config.DispMethod == Config.EDispMethod.OpenGL;
|
||||||
rbGDIPlus.Checked = Global.Config.DispMethod == Config.EDispMethod.GdiPlus;
|
rbGDIPlus.Checked = Global.Config.DispMethod == Config.EDispMethod.GdiPlus;
|
||||||
rbD3D9.Checked = Global.Config.DispMethod == Config.EDispMethod.SlimDX9;
|
rbD3D9.Checked = Global.Config.DispMethod == Config.EDispMethod.SlimDX9;
|
||||||
|
|
||||||
cbStatusBarWindowed.Checked = Global.Config.DispChrome_StatusBarWindowed;
|
cbStatusBarWindowed.Checked = Global.Config.DispChrome_StatusBarWindowed;
|
||||||
cbCaptionWindowed.Checked = Global.Config.DispChrome_CaptionWindowed;
|
cbCaptionWindowed.Checked = Global.Config.DispChrome_CaptionWindowed;
|
||||||
cbMenuWindowed.Checked = Global.Config.DispChrome_MenuWindowed;
|
cbMenuWindowed.Checked = Global.Config.DispChrome_MenuWindowed;
|
||||||
cbStatusBarFullscreen.Checked = Global.Config.DispChrome_StatusBarFullscreen;
|
cbStatusBarFullscreen.Checked = Global.Config.DispChrome_StatusBarFullscreen;
|
||||||
cbMenuFullscreen.Checked = Global.Config.DispChrome_MenuFullscreen;
|
cbMenuFullscreen.Checked = Global.Config.DispChrome_MenuFullscreen;
|
||||||
trackbarFrameSizeWindowed.Value = Global.Config.DispChrome_FrameWindowed;
|
trackbarFrameSizeWindowed.Value = Global.Config.DispChrome_FrameWindowed;
|
||||||
cbFSAutohideMouse.Checked = Global.Config.DispChrome_Fullscreen_AutohideMouse;
|
cbFSAutohideMouse.Checked = Global.Config.DispChrome_Fullscreen_AutohideMouse;
|
||||||
SyncTrackBar();
|
SyncTrackBar();
|
||||||
|
|
||||||
cbAllowDoubleclickFullscreen.Checked = Global.Config.DispChrome_AllowDoubleClickFullscreen;
|
cbAllowDoubleclickFullscreen.Checked = Global.Config.DispChrome_AllowDoubleClickFullscreen;
|
||||||
|
|
||||||
nudPrescale.Value = Global.Config.DispPrescale;
|
nudPrescale.Value = Global.Config.DispPrescale;
|
||||||
|
|
||||||
if (Global.Config.DispManagerAR == Config.EDispManagerAR.None)
|
if (Global.Config.DispManagerAR == Config.EDispManagerAR.None)
|
||||||
rbUseRaw.Checked = true;
|
rbUseRaw.Checked = true;
|
||||||
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.System)
|
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.System)
|
||||||
rbUseSystem.Checked = true;
|
rbUseSystem.Checked = true;
|
||||||
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
|
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
|
||||||
rbUseCustom.Checked = true;
|
rbUseCustom.Checked = true;
|
||||||
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
|
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
|
||||||
rbUseCustomRatio.Checked = true;
|
rbUseCustomRatio.Checked = true;
|
||||||
|
|
||||||
if(Global.Config.DispCustomUserARWidth != -1)
|
if(Global.Config.DispCustomUserARWidth != -1)
|
||||||
txtCustomARWidth.Text = Global.Config.DispCustomUserARWidth.ToString();
|
txtCustomARWidth.Text = Global.Config.DispCustomUserARWidth.ToString();
|
||||||
if (Global.Config.DispCustomUserARHeight != -1)
|
if (Global.Config.DispCustomUserARHeight != -1)
|
||||||
txtCustomARHeight.Text = Global.Config.DispCustomUserARHeight.ToString();
|
txtCustomARHeight.Text = Global.Config.DispCustomUserARHeight.ToString();
|
||||||
if (Global.Config.DispCustomUserARX != -1)
|
if (Global.Config.DispCustomUserARX != -1)
|
||||||
txtCustomARX.Text = Global.Config.DispCustomUserARX.ToString();
|
txtCustomARX.Text = Global.Config.DispCustomUserARX.ToString();
|
||||||
if (Global.Config.DispCustomUserARY != -1)
|
if (Global.Config.DispCustomUserARY != -1)
|
||||||
txtCustomARY.Text = Global.Config.DispCustomUserARY.ToString();
|
txtCustomARY.Text = Global.Config.DispCustomUserARY.ToString();
|
||||||
|
|
||||||
txtCropLeft.Text = Global.Config.DispCropLeft.ToString();
|
txtCropLeft.Text = Global.Config.DispCropLeft.ToString();
|
||||||
txtCropTop.Text = Global.Config.DispCropTop.ToString();
|
txtCropTop.Text = Global.Config.DispCropTop.ToString();
|
||||||
txtCropRight.Text = Global.Config.DispCropRight.ToString();
|
txtCropRight.Text = Global.Config.DispCropRight.ToString();
|
||||||
txtCropBottom.Text = Global.Config.DispCropBottom.ToString();
|
txtCropBottom.Text = Global.Config.DispCropBottom.ToString();
|
||||||
|
|
||||||
RefreshAspectRatioOptions();
|
RefreshAspectRatioOptions();
|
||||||
|
|
||||||
if (OSTailoredCode.IsUnixHost)
|
if (OSTailoredCode.IsUnixHost)
|
||||||
{
|
{
|
||||||
// Disable SlimDX on Unix
|
// Disable SlimDX on Unix
|
||||||
rbD3D9.Enabled = false;
|
rbD3D9.Enabled = false;
|
||||||
rbD3D9.AutoCheck = false;
|
rbD3D9.AutoCheck = false;
|
||||||
cbAlternateVsync.Enabled = false;
|
cbAlternateVsync.Enabled = false;
|
||||||
label13.Enabled = false;
|
label13.Enabled = false;
|
||||||
label8.Enabled = false;
|
label8.Enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnOk_Click(object sender, EventArgs e)
|
private void btnOk_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (rbNone.Checked)
|
if (rbNone.Checked)
|
||||||
Global.Config.TargetDisplayFilter = 0;
|
Global.Config.TargetDisplayFilter = 0;
|
||||||
if (rbHq2x.Checked)
|
if (rbHq2x.Checked)
|
||||||
Global.Config.TargetDisplayFilter = 1;
|
Global.Config.TargetDisplayFilter = 1;
|
||||||
if (rbScanlines.Checked)
|
if (rbScanlines.Checked)
|
||||||
Global.Config.TargetDisplayFilter = 2;
|
Global.Config.TargetDisplayFilter = 2;
|
||||||
if (rbUser.Checked)
|
if (rbUser.Checked)
|
||||||
Global.Config.TargetDisplayFilter = 3;
|
Global.Config.TargetDisplayFilter = 3;
|
||||||
|
|
||||||
if (rbFinalFilterNone.Checked)
|
if (rbFinalFilterNone.Checked)
|
||||||
Global.Config.DispFinalFilter = 0;
|
Global.Config.DispFinalFilter = 0;
|
||||||
if (rbFinalFilterBilinear.Checked)
|
if (rbFinalFilterBilinear.Checked)
|
||||||
Global.Config.DispFinalFilter = 1;
|
Global.Config.DispFinalFilter = 1;
|
||||||
if (rbFinalFilterBicubic.Checked)
|
if (rbFinalFilterBicubic.Checked)
|
||||||
Global.Config.DispFinalFilter = 2;
|
Global.Config.DispFinalFilter = 2;
|
||||||
|
|
||||||
Global.Config.DispPrescale = (int)nudPrescale.Value;
|
Global.Config.DispPrescale = (int)nudPrescale.Value;
|
||||||
|
|
||||||
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
||||||
Global.Config.DispFixAspectRatio = checkLetterbox.Checked;
|
Global.Config.DispFixAspectRatio = checkLetterbox.Checked;
|
||||||
Global.Config.DispFixScaleInteger = checkPadInteger.Checked;
|
Global.Config.DispFixScaleInteger = checkPadInteger.Checked;
|
||||||
Global.Config.DispFullscreenHacks = cbFullscreenHacks.Checked;
|
Global.Config.DispFullscreenHacks = cbFullscreenHacks.Checked;
|
||||||
Global.Config.DispAutoPrescale = cbAutoPrescale.Checked;
|
Global.Config.DispAutoPrescale = cbAutoPrescale.Checked;
|
||||||
|
|
||||||
Global.Config.DispAlternateVsync = cbAlternateVsync.Checked;
|
Global.Config.DispAlternateVsync = cbAlternateVsync.Checked;
|
||||||
|
|
||||||
Global.Config.DispChrome_StatusBarWindowed = cbStatusBarWindowed.Checked;
|
Global.Config.DispChrome_StatusBarWindowed = cbStatusBarWindowed.Checked;
|
||||||
Global.Config.DispChrome_CaptionWindowed = cbCaptionWindowed.Checked;
|
Global.Config.DispChrome_CaptionWindowed = cbCaptionWindowed.Checked;
|
||||||
Global.Config.DispChrome_MenuWindowed = cbMenuWindowed.Checked;
|
Global.Config.DispChrome_MenuWindowed = cbMenuWindowed.Checked;
|
||||||
Global.Config.DispChrome_StatusBarFullscreen = cbStatusBarFullscreen.Checked;
|
Global.Config.DispChrome_StatusBarFullscreen = cbStatusBarFullscreen.Checked;
|
||||||
Global.Config.DispChrome_MenuFullscreen = cbMenuFullscreen.Checked;
|
Global.Config.DispChrome_MenuFullscreen = cbMenuFullscreen.Checked;
|
||||||
Global.Config.DispChrome_FrameWindowed = trackbarFrameSizeWindowed.Value;
|
Global.Config.DispChrome_FrameWindowed = trackbarFrameSizeWindowed.Value;
|
||||||
Global.Config.DispChrome_Fullscreen_AutohideMouse = cbFSAutohideMouse.Checked;
|
Global.Config.DispChrome_Fullscreen_AutohideMouse = cbFSAutohideMouse.Checked;
|
||||||
Global.Config.DispChrome_AllowDoubleClickFullscreen = cbAllowDoubleclickFullscreen.Checked;
|
Global.Config.DispChrome_AllowDoubleClickFullscreen = cbAllowDoubleclickFullscreen.Checked;
|
||||||
|
|
||||||
if (rbDisplayFull.Checked) Global.Config.DispSpeedupFeatures = 2;
|
if (rbDisplayFull.Checked) Global.Config.DispSpeedupFeatures = 2;
|
||||||
if (rbDisplayMinimal.Checked) Global.Config.DispSpeedupFeatures = 1;
|
if (rbDisplayMinimal.Checked) Global.Config.DispSpeedupFeatures = 1;
|
||||||
if (rbDisplayAbsoluteZero.Checked) Global.Config.DispSpeedupFeatures = 0;
|
if (rbDisplayAbsoluteZero.Checked) Global.Config.DispSpeedupFeatures = 0;
|
||||||
|
|
||||||
if (rbUseRaw.Checked)
|
if (rbUseRaw.Checked)
|
||||||
Global.Config.DispManagerAR = Config.EDispManagerAR.None;
|
Global.Config.DispManagerAR = Config.EDispManagerAR.None;
|
||||||
else if (rbUseSystem.Checked)
|
else if (rbUseSystem.Checked)
|
||||||
Global.Config.DispManagerAR = Config.EDispManagerAR.System;
|
Global.Config.DispManagerAR = Config.EDispManagerAR.System;
|
||||||
else if (rbUseCustom.Checked)
|
else if (rbUseCustom.Checked)
|
||||||
Global.Config.DispManagerAR = Config.EDispManagerAR.Custom;
|
Global.Config.DispManagerAR = Config.EDispManagerAR.Custom;
|
||||||
else if (rbUseCustomRatio.Checked)
|
else if (rbUseCustomRatio.Checked)
|
||||||
Global.Config.DispManagerAR = Config.EDispManagerAR.CustomRatio;
|
Global.Config.DispManagerAR = Config.EDispManagerAR.CustomRatio;
|
||||||
|
|
||||||
if (txtCustomARWidth.Text != "")
|
if (txtCustomARWidth.Text != "")
|
||||||
int.TryParse(txtCustomARWidth.Text, out Global.Config.DispCustomUserARWidth);
|
int.TryParse(txtCustomARWidth.Text, out Global.Config.DispCustomUserARWidth);
|
||||||
else Global.Config.DispCustomUserARWidth = -1;
|
else Global.Config.DispCustomUserARWidth = -1;
|
||||||
if (txtCustomARHeight.Text != "")
|
if (txtCustomARHeight.Text != "")
|
||||||
int.TryParse(txtCustomARHeight.Text, out Global.Config.DispCustomUserARHeight);
|
int.TryParse(txtCustomARHeight.Text, out Global.Config.DispCustomUserARHeight);
|
||||||
else Global.Config.DispCustomUserARHeight = -1;
|
else Global.Config.DispCustomUserARHeight = -1;
|
||||||
if (txtCustomARX.Text != "")
|
if (txtCustomARX.Text != "")
|
||||||
float.TryParse(txtCustomARX.Text, out Global.Config.DispCustomUserARX);
|
float.TryParse(txtCustomARX.Text, out Global.Config.DispCustomUserARX);
|
||||||
else Global.Config.DispCustomUserARX = -1;
|
else Global.Config.DispCustomUserARX = -1;
|
||||||
if (txtCustomARY.Text != "")
|
if (txtCustomARY.Text != "")
|
||||||
float.TryParse(txtCustomARY.Text, out Global.Config.DispCustomUserARY);
|
float.TryParse(txtCustomARY.Text, out Global.Config.DispCustomUserARY);
|
||||||
else Global.Config.DispCustomUserARY = -1;
|
else Global.Config.DispCustomUserARY = -1;
|
||||||
|
|
||||||
var oldDisplayMethod = Global.Config.DispMethod;
|
var oldDisplayMethod = Global.Config.DispMethod;
|
||||||
if(rbOpenGL.Checked)
|
if(rbOpenGL.Checked)
|
||||||
Global.Config.DispMethod = Config.EDispMethod.OpenGL;
|
Global.Config.DispMethod = Config.EDispMethod.OpenGL;
|
||||||
if(rbGDIPlus.Checked)
|
if(rbGDIPlus.Checked)
|
||||||
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
||||||
if(rbD3D9.Checked)
|
if(rbD3D9.Checked)
|
||||||
Global.Config.DispMethod = Config.EDispMethod.SlimDX9;
|
Global.Config.DispMethod = Config.EDispMethod.SlimDX9;
|
||||||
|
|
||||||
int.TryParse(txtCropLeft.Text, out Global.Config.DispCropLeft);
|
int.TryParse(txtCropLeft.Text, out Global.Config.DispCropLeft);
|
||||||
int.TryParse(txtCropTop.Text, out Global.Config.DispCropTop);
|
int.TryParse(txtCropTop.Text, out Global.Config.DispCropTop);
|
||||||
int.TryParse(txtCropRight.Text, out Global.Config.DispCropRight);
|
int.TryParse(txtCropRight.Text, out Global.Config.DispCropRight);
|
||||||
int.TryParse(txtCropBottom.Text, out Global.Config.DispCropBottom);
|
int.TryParse(txtCropBottom.Text, out Global.Config.DispCropBottom);
|
||||||
|
|
||||||
if (oldDisplayMethod != Global.Config.DispMethod)
|
if (oldDisplayMethod != Global.Config.DispMethod)
|
||||||
NeedReset = true;
|
NeedReset = true;
|
||||||
|
|
||||||
Global.Config.DispUserFilterPath = _pathSelection;
|
Global.Config.DispUserFilterPath = _pathSelection;
|
||||||
GlobalWin.DisplayManager.RefreshUserShader();
|
GlobalWin.DisplayManager.RefreshUserShader();
|
||||||
|
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RefreshState()
|
void RefreshState()
|
||||||
{
|
{
|
||||||
lblUserFilterName.Text = Path.GetFileNameWithoutExtension(_pathSelection);
|
lblUserFilterName.Text = Path.GetFileNameWithoutExtension(_pathSelection);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnSelectUserFilter_Click(object sender, EventArgs e)
|
private void btnSelectUserFilter_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
using var ofd = new OpenFileDialog
|
using var ofd = new OpenFileDialog
|
||||||
{
|
{
|
||||||
Filter = ".CGP (*.cgp)|*.cgp",
|
Filter = ".CGP (*.cgp)|*.cgp",
|
||||||
FileName = _pathSelection
|
FileName = _pathSelection
|
||||||
};
|
};
|
||||||
if (ofd.ShowDialog() == DialogResult.OK)
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
rbUser.Checked = true;
|
rbUser.Checked = true;
|
||||||
var choice = Path.GetFullPath(ofd.FileName);
|
var choice = Path.GetFullPath(ofd.FileName);
|
||||||
|
|
||||||
//test the preset
|
//test the preset
|
||||||
using (var stream = File.OpenRead(choice))
|
using (var stream = File.OpenRead(choice))
|
||||||
{
|
{
|
||||||
var cgp = new BizHawk.Client.EmuHawk.Filters.RetroShaderPreset(stream);
|
var cgp = new BizHawk.Client.EmuHawk.Filters.RetroShaderPreset(stream);
|
||||||
if (cgp.ContainsGLSL)
|
if (cgp.ContainsGLSL)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Specified CGP contains references to .glsl files. This is illegal. Use .cg");
|
MessageBox.Show("Specified CGP contains references to .glsl files. This is illegal. Use .cg");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//try compiling it
|
//try compiling it
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
string errors = "";
|
string errors = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var filter = new BizHawk.Client.EmuHawk.Filters.RetroShaderChain(GlobalWin.GL, cgp, Path.GetDirectoryName(choice));
|
var filter = new BizHawk.Client.EmuHawk.Filters.RetroShaderChain(GlobalWin.GL, cgp, Path.GetDirectoryName(choice));
|
||||||
ok = filter.Available;
|
ok = filter.Available;
|
||||||
errors = filter.Errors;
|
errors = filter.Errors;
|
||||||
}
|
}
|
||||||
catch {}
|
catch {}
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
using var errorForm = new ExceptionBox(errors);
|
using var errorForm = new ExceptionBox(errors);
|
||||||
errorForm.ShowDialog();
|
errorForm.ShowDialog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_pathSelection = choice;
|
_pathSelection = choice;
|
||||||
RefreshState();
|
RefreshState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkLetterbox_CheckedChanged(object sender, EventArgs e)
|
private void checkLetterbox_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RefreshAspectRatioOptions();
|
RefreshAspectRatioOptions();
|
||||||
}
|
}
|
||||||
private void checkPadInteger_CheckedChanged(object sender, EventArgs e)
|
private void checkPadInteger_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RefreshAspectRatioOptions();
|
RefreshAspectRatioOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rbUseRaw_CheckedChanged(object sender, EventArgs e)
|
private void rbUseRaw_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RefreshAspectRatioOptions();
|
RefreshAspectRatioOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rbUseSystem_CheckedChanged(object sender, EventArgs e)
|
private void rbUseSystem_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RefreshAspectRatioOptions();
|
RefreshAspectRatioOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RefreshAspectRatioOptions()
|
void RefreshAspectRatioOptions()
|
||||||
{
|
{
|
||||||
grpARSelection.Enabled = checkLetterbox.Checked;
|
grpARSelection.Enabled = checkLetterbox.Checked;
|
||||||
checkPadInteger.Enabled = checkLetterbox.Checked;
|
checkPadInteger.Enabled = checkLetterbox.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tbScanlineIntensity_Scroll(object sender, EventArgs e)
|
public void tbScanlineIntensity_Scroll(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
||||||
int scanlines = Global.Config.TargetScanlineFilterIntensity;
|
int scanlines = Global.Config.TargetScanlineFilterIntensity;
|
||||||
float percentage = (float) scanlines / 256 * 100;
|
float percentage = (float) scanlines / 256 * 100;
|
||||||
lblScanlines.Text = $"{percentage:F2}%";
|
lblScanlines.Text = $"{percentage:F2}%";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TrackBarFrameSizeWindowed_ValueChanged(object sender, EventArgs e)
|
private void TrackBarFrameSizeWindowed_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SyncTrackBar();
|
SyncTrackBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SyncTrackBar()
|
void SyncTrackBar()
|
||||||
{
|
{
|
||||||
if (trackbarFrameSizeWindowed.Value == 0)
|
if (trackbarFrameSizeWindowed.Value == 0)
|
||||||
{
|
{
|
||||||
lblFrameTypeWindowed.Text = "None";
|
lblFrameTypeWindowed.Text = "None";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trackbarFrameSizeWindowed.Value == 1)
|
if (trackbarFrameSizeWindowed.Value == 1)
|
||||||
{
|
{
|
||||||
lblFrameTypeWindowed.Text = "Thin";
|
lblFrameTypeWindowed.Text = "Thin";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trackbarFrameSizeWindowed.Value == 2)
|
if (trackbarFrameSizeWindowed.Value == 2)
|
||||||
{
|
{
|
||||||
lblFrameTypeWindowed.Text = "Thick";
|
lblFrameTypeWindowed.Text = "Thick";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start("http://tasvideos.org/Bizhawk/DisplayConfig.html");
|
System.Diagnostics.Process.Start("http://tasvideos.org/Bizhawk/DisplayConfig.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void label13_Click(object sender, EventArgs e)
|
private void label13_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
cbAlternateVsync.Checked ^= true;
|
cbAlternateVsync.Checked ^= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnDefaults_Click(object sender, EventArgs e)
|
private void btnDefaults_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
nudPrescale.Value = 1;
|
nudPrescale.Value = 1;
|
||||||
rbNone.Checked = true;
|
rbNone.Checked = true;
|
||||||
cbAutoPrescale.Checked = true;
|
cbAutoPrescale.Checked = true;
|
||||||
rbFinalFilterBilinear.Checked = true;
|
rbFinalFilterBilinear.Checked = true;
|
||||||
checkLetterbox.Checked = true;
|
checkLetterbox.Checked = true;
|
||||||
rbUseSystem.Checked = true;
|
rbUseSystem.Checked = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,132 +1,132 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="metadata">
|
<xsd:element name="metadata">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
<xsd:attribute ref="xml:space" />
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="assembly">
|
<xsd:element name="assembly">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="data">
|
<xsd:element name="data">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
<xsd:attribute ref="xml:space" />
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="resheader">
|
<xsd:element name="resheader">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
<resheader name="resmimetype">
|
<resheader name="resmimetype">
|
||||||
<value>text/microsoft-resx</value>
|
<value>text/microsoft-resx</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="version">
|
<resheader name="version">
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="label13.Text" xml:space="preserve">
|
<data name="label13.Text" xml:space="preserve">
|
||||||
<value>Alternate VSync Method: Some GPUs have problems VSyncing. It seems to manifest on full-screen windows. There will be hiccups when throttling to VSync. Use this to try and solve it (busy loop; burns major CPU)</value>
|
<value>Alternate VSync Method: Some GPUs have problems VSyncing. It seems to manifest on full-screen windows. There will be hiccups when throttling to VSync. Use this to try and solve it (busy loop; burns major CPU)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="label1.Text" xml:space="preserve">
|
<data name="label1.Text" xml:space="preserve">
|
||||||
<value>For Windows operating systems >= Vista, with some video cards, the monitors may flicker when going 'windowed fullscreen' while the system disobeys us and goes actual fullscreen instead. This hack prevents that, but may increase frame latency (since in Microsoft's new and disimproved operating systems, windowed mode things may have higher latency)</value>
|
<value>For Windows operating systems >= Vista, with some video cards, the monitors may flicker when going 'windowed fullscreen' while the system disobeys us and goes actual fullscreen instead. This hack prevents that, but may increase frame latency (since in Microsoft's new and disimproved operating systems, windowed mode things may have higher latency)</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue