rename DisplayConfigLite to DisplayConfig, it isn't very Lite anymore :)

This commit is contained in:
adelikat 2019-12-16 18:41:54 -06:00
parent 8eff248d96
commit 8fcd9bb2a5
5 changed files with 1538 additions and 1538 deletions

View File

@ -270,11 +270,11 @@
<Compile Include="config\ControllerConfig\ControllerConfigPanel.Designer.cs">
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
</Compile>
<Compile Include="config\DisplayConfigLite.cs">
<Compile Include="config\DisplayConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="config\DisplayConfigLite.Designer.cs">
<DependentUpon>DisplayConfigLite.cs</DependentUpon>
<Compile Include="config\DisplayConfig.Designer.cs">
<DependentUpon>DisplayConfig.cs</DependentUpon>
</Compile>
<Compile Include="config\FileExtensionPreferences.cs">
<SubType>Form</SubType>
@ -1328,8 +1328,8 @@
<EmbeddedResource Include="config\ControllerConfig\ControllerConfigPanel.resx">
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="config\DisplayConfigLite.resx">
<DependentUpon>DisplayConfigLite.cs</DependentUpon>
<EmbeddedResource Include="config\DisplayConfig.resx">
<DependentUpon>DisplayConfig.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="config\FileExtensionPreferences.resx">

View File

@ -3061,7 +3061,7 @@ namespace BizHawk.Client.EmuHawk
private void DisplayConfigMenuItem_Click(object sender, EventArgs e)
{
using var window = new DisplayConfigLite();
using var window = new DisplayConfig();
var result = window.ShowDialog();
if (result == DialogResult.OK)
{

View File

@ -1,308 +1,308 @@
using System;
using System.IO;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class DisplayConfigLite : Form
{
public bool NeedReset;
string _pathSelection;
public DisplayConfigLite()
{
InitializeComponent();
rbNone.Checked = Global.Config.TargetDisplayFilter == 0;
rbHq2x.Checked = Global.Config.TargetDisplayFilter == 1;
rbScanlines.Checked = Global.Config.TargetDisplayFilter == 2;
rbUser.Checked = Global.Config.TargetDisplayFilter == 3;
_pathSelection = Global.Config.DispUserFilterPath ?? "";
RefreshState();
rbFinalFilterNone.Checked = Global.Config.DispFinalFilter == 0;
rbFinalFilterBilinear.Checked = Global.Config.DispFinalFilter == 1;
rbFinalFilterBicubic.Checked = Global.Config.DispFinalFilter == 2;
tbScanlineIntensity.Value = Global.Config.TargetScanlineFilterIntensity;
checkLetterbox.Checked = Global.Config.DispFixAspectRatio;
checkPadInteger.Checked = Global.Config.DispFixScaleInteger;
cbFullscreenHacks.Checked = Global.Config.DispFullscreenHacks;
cbAutoPrescale.Checked = Global.Config.DispAutoPrescale;
cbAlternateVsync.Checked = Global.Config.DispAlternateVsync;
if (Global.Config.DispSpeedupFeatures == 2) rbDisplayFull.Checked = true;
if (Global.Config.DispSpeedupFeatures == 1) rbDisplayMinimal.Checked = true;
if (Global.Config.DispSpeedupFeatures == 0) rbDisplayAbsoluteZero.Checked = true;
rbOpenGL.Checked = Global.Config.DispMethod == Config.EDispMethod.OpenGL;
rbGDIPlus.Checked = Global.Config.DispMethod == Config.EDispMethod.GdiPlus;
rbD3D9.Checked = Global.Config.DispMethod == Config.EDispMethod.SlimDX9;
cbStatusBarWindowed.Checked = Global.Config.DispChrome_StatusBarWindowed;
cbCaptionWindowed.Checked = Global.Config.DispChrome_CaptionWindowed;
cbMenuWindowed.Checked = Global.Config.DispChrome_MenuWindowed;
cbStatusBarFullscreen.Checked = Global.Config.DispChrome_StatusBarFullscreen;
cbMenuFullscreen.Checked = Global.Config.DispChrome_MenuFullscreen;
trackbarFrameSizeWindowed.Value = Global.Config.DispChrome_FrameWindowed;
cbFSAutohideMouse.Checked = Global.Config.DispChrome_Fullscreen_AutohideMouse;
SyncTrackBar();
cbAllowDoubleclickFullscreen.Checked = Global.Config.DispChrome_AllowDoubleClickFullscreen;
nudPrescale.Value = Global.Config.DispPrescale;
if (Global.Config.DispManagerAR == Config.EDispManagerAR.None)
rbUseRaw.Checked = true;
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.System)
rbUseSystem.Checked = true;
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
rbUseCustom.Checked = true;
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
rbUseCustomRatio.Checked = true;
if(Global.Config.DispCustomUserARWidth != -1)
txtCustomARWidth.Text = Global.Config.DispCustomUserARWidth.ToString();
if (Global.Config.DispCustomUserARHeight != -1)
txtCustomARHeight.Text = Global.Config.DispCustomUserARHeight.ToString();
if (Global.Config.DispCustomUserARX != -1)
txtCustomARX.Text = Global.Config.DispCustomUserARX.ToString();
if (Global.Config.DispCustomUserARY != -1)
txtCustomARY.Text = Global.Config.DispCustomUserARY.ToString();
txtCropLeft.Text = Global.Config.DispCropLeft.ToString();
txtCropTop.Text = Global.Config.DispCropTop.ToString();
txtCropRight.Text = Global.Config.DispCropRight.ToString();
txtCropBottom.Text = Global.Config.DispCropBottom.ToString();
RefreshAspectRatioOptions();
if (OSTailoredCode.IsUnixHost)
{
// Disable SlimDX on Unix
rbD3D9.Enabled = false;
rbD3D9.AutoCheck = false;
cbAlternateVsync.Enabled = false;
label13.Enabled = false;
label8.Enabled = false;
}
}
private void btnOk_Click(object sender, EventArgs e)
{
if (rbNone.Checked)
Global.Config.TargetDisplayFilter = 0;
if (rbHq2x.Checked)
Global.Config.TargetDisplayFilter = 1;
if (rbScanlines.Checked)
Global.Config.TargetDisplayFilter = 2;
if (rbUser.Checked)
Global.Config.TargetDisplayFilter = 3;
if (rbFinalFilterNone.Checked)
Global.Config.DispFinalFilter = 0;
if (rbFinalFilterBilinear.Checked)
Global.Config.DispFinalFilter = 1;
if (rbFinalFilterBicubic.Checked)
Global.Config.DispFinalFilter = 2;
Global.Config.DispPrescale = (int)nudPrescale.Value;
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
Global.Config.DispFixAspectRatio = checkLetterbox.Checked;
Global.Config.DispFixScaleInteger = checkPadInteger.Checked;
Global.Config.DispFullscreenHacks = cbFullscreenHacks.Checked;
Global.Config.DispAutoPrescale = cbAutoPrescale.Checked;
Global.Config.DispAlternateVsync = cbAlternateVsync.Checked;
Global.Config.DispChrome_StatusBarWindowed = cbStatusBarWindowed.Checked;
Global.Config.DispChrome_CaptionWindowed = cbCaptionWindowed.Checked;
Global.Config.DispChrome_MenuWindowed = cbMenuWindowed.Checked;
Global.Config.DispChrome_StatusBarFullscreen = cbStatusBarFullscreen.Checked;
Global.Config.DispChrome_MenuFullscreen = cbMenuFullscreen.Checked;
Global.Config.DispChrome_FrameWindowed = trackbarFrameSizeWindowed.Value;
Global.Config.DispChrome_Fullscreen_AutohideMouse = cbFSAutohideMouse.Checked;
Global.Config.DispChrome_AllowDoubleClickFullscreen = cbAllowDoubleclickFullscreen.Checked;
if (rbDisplayFull.Checked) Global.Config.DispSpeedupFeatures = 2;
if (rbDisplayMinimal.Checked) Global.Config.DispSpeedupFeatures = 1;
if (rbDisplayAbsoluteZero.Checked) Global.Config.DispSpeedupFeatures = 0;
if (rbUseRaw.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.None;
else if (rbUseSystem.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.System;
else if (rbUseCustom.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.Custom;
else if (rbUseCustomRatio.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.CustomRatio;
if (txtCustomARWidth.Text != "")
int.TryParse(txtCustomARWidth.Text, out Global.Config.DispCustomUserARWidth);
else Global.Config.DispCustomUserARWidth = -1;
if (txtCustomARHeight.Text != "")
int.TryParse(txtCustomARHeight.Text, out Global.Config.DispCustomUserARHeight);
else Global.Config.DispCustomUserARHeight = -1;
if (txtCustomARX.Text != "")
float.TryParse(txtCustomARX.Text, out Global.Config.DispCustomUserARX);
else Global.Config.DispCustomUserARX = -1;
if (txtCustomARY.Text != "")
float.TryParse(txtCustomARY.Text, out Global.Config.DispCustomUserARY);
else Global.Config.DispCustomUserARY = -1;
var oldDisplayMethod = Global.Config.DispMethod;
if(rbOpenGL.Checked)
Global.Config.DispMethod = Config.EDispMethod.OpenGL;
if(rbGDIPlus.Checked)
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
if(rbD3D9.Checked)
Global.Config.DispMethod = Config.EDispMethod.SlimDX9;
int.TryParse(txtCropLeft.Text, out Global.Config.DispCropLeft);
int.TryParse(txtCropTop.Text, out Global.Config.DispCropTop);
int.TryParse(txtCropRight.Text, out Global.Config.DispCropRight);
int.TryParse(txtCropBottom.Text, out Global.Config.DispCropBottom);
if (oldDisplayMethod != Global.Config.DispMethod)
NeedReset = true;
Global.Config.DispUserFilterPath = _pathSelection;
GlobalWin.DisplayManager.RefreshUserShader();
DialogResult = DialogResult.OK;
Close();
}
void RefreshState()
{
lblUserFilterName.Text = Path.GetFileNameWithoutExtension(_pathSelection);
}
private void btnSelectUserFilter_Click(object sender, EventArgs e)
{
using var ofd = new OpenFileDialog
{
Filter = ".CGP (*.cgp)|*.cgp",
FileName = _pathSelection
};
if (ofd.ShowDialog() == DialogResult.OK)
{
rbUser.Checked = true;
var choice = Path.GetFullPath(ofd.FileName);
//test the preset
using (var stream = File.OpenRead(choice))
{
var cgp = new BizHawk.Client.EmuHawk.Filters.RetroShaderPreset(stream);
if (cgp.ContainsGLSL)
{
MessageBox.Show("Specified CGP contains references to .glsl files. This is illegal. Use .cg");
return;
}
//try compiling it
bool ok = false;
string errors = "";
try
{
var filter = new BizHawk.Client.EmuHawk.Filters.RetroShaderChain(GlobalWin.GL, cgp, Path.GetDirectoryName(choice));
ok = filter.Available;
errors = filter.Errors;
}
catch {}
if (!ok)
{
using var errorForm = new ExceptionBox(errors);
errorForm.ShowDialog();
return;
}
}
_pathSelection = choice;
RefreshState();
}
}
private void checkLetterbox_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
private void checkPadInteger_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
private void rbUseRaw_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
private void rbUseSystem_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
void RefreshAspectRatioOptions()
{
grpARSelection.Enabled = checkLetterbox.Checked;
checkPadInteger.Enabled = checkLetterbox.Checked;
}
public void tbScanlineIntensity_Scroll(object sender, EventArgs e)
{
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
int scanlines = Global.Config.TargetScanlineFilterIntensity;
float percentage = (float) scanlines / 256 * 100;
lblScanlines.Text = $"{percentage:F2}%";
}
private void TrackBarFrameSizeWindowed_ValueChanged(object sender, EventArgs e)
{
SyncTrackBar();
}
void SyncTrackBar()
{
if (trackbarFrameSizeWindowed.Value == 0)
{
lblFrameTypeWindowed.Text = "None";
}
if (trackbarFrameSizeWindowed.Value == 1)
{
lblFrameTypeWindowed.Text = "Thin";
}
if (trackbarFrameSizeWindowed.Value == 2)
{
lblFrameTypeWindowed.Text = "Thick";
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://tasvideos.org/Bizhawk/DisplayConfig.html");
}
private void label13_Click(object sender, EventArgs e)
{
cbAlternateVsync.Checked ^= true;
}
private void btnDefaults_Click(object sender, EventArgs e)
{
nudPrescale.Value = 1;
rbNone.Checked = true;
cbAutoPrescale.Checked = true;
rbFinalFilterBilinear.Checked = true;
checkLetterbox.Checked = true;
rbUseSystem.Checked = true;
}
}
}
using System;
using System.IO;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class DisplayConfig : Form
{
public bool NeedReset;
string _pathSelection;
public DisplayConfig()
{
InitializeComponent();
rbNone.Checked = Global.Config.TargetDisplayFilter == 0;
rbHq2x.Checked = Global.Config.TargetDisplayFilter == 1;
rbScanlines.Checked = Global.Config.TargetDisplayFilter == 2;
rbUser.Checked = Global.Config.TargetDisplayFilter == 3;
_pathSelection = Global.Config.DispUserFilterPath ?? "";
RefreshState();
rbFinalFilterNone.Checked = Global.Config.DispFinalFilter == 0;
rbFinalFilterBilinear.Checked = Global.Config.DispFinalFilter == 1;
rbFinalFilterBicubic.Checked = Global.Config.DispFinalFilter == 2;
tbScanlineIntensity.Value = Global.Config.TargetScanlineFilterIntensity;
checkLetterbox.Checked = Global.Config.DispFixAspectRatio;
checkPadInteger.Checked = Global.Config.DispFixScaleInteger;
cbFullscreenHacks.Checked = Global.Config.DispFullscreenHacks;
cbAutoPrescale.Checked = Global.Config.DispAutoPrescale;
cbAlternateVsync.Checked = Global.Config.DispAlternateVsync;
if (Global.Config.DispSpeedupFeatures == 2) rbDisplayFull.Checked = true;
if (Global.Config.DispSpeedupFeatures == 1) rbDisplayMinimal.Checked = true;
if (Global.Config.DispSpeedupFeatures == 0) rbDisplayAbsoluteZero.Checked = true;
rbOpenGL.Checked = Global.Config.DispMethod == Config.EDispMethod.OpenGL;
rbGDIPlus.Checked = Global.Config.DispMethod == Config.EDispMethod.GdiPlus;
rbD3D9.Checked = Global.Config.DispMethod == Config.EDispMethod.SlimDX9;
cbStatusBarWindowed.Checked = Global.Config.DispChrome_StatusBarWindowed;
cbCaptionWindowed.Checked = Global.Config.DispChrome_CaptionWindowed;
cbMenuWindowed.Checked = Global.Config.DispChrome_MenuWindowed;
cbStatusBarFullscreen.Checked = Global.Config.DispChrome_StatusBarFullscreen;
cbMenuFullscreen.Checked = Global.Config.DispChrome_MenuFullscreen;
trackbarFrameSizeWindowed.Value = Global.Config.DispChrome_FrameWindowed;
cbFSAutohideMouse.Checked = Global.Config.DispChrome_Fullscreen_AutohideMouse;
SyncTrackBar();
cbAllowDoubleclickFullscreen.Checked = Global.Config.DispChrome_AllowDoubleClickFullscreen;
nudPrescale.Value = Global.Config.DispPrescale;
if (Global.Config.DispManagerAR == Config.EDispManagerAR.None)
rbUseRaw.Checked = true;
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.System)
rbUseSystem.Checked = true;
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
rbUseCustom.Checked = true;
else if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
rbUseCustomRatio.Checked = true;
if(Global.Config.DispCustomUserARWidth != -1)
txtCustomARWidth.Text = Global.Config.DispCustomUserARWidth.ToString();
if (Global.Config.DispCustomUserARHeight != -1)
txtCustomARHeight.Text = Global.Config.DispCustomUserARHeight.ToString();
if (Global.Config.DispCustomUserARX != -1)
txtCustomARX.Text = Global.Config.DispCustomUserARX.ToString();
if (Global.Config.DispCustomUserARY != -1)
txtCustomARY.Text = Global.Config.DispCustomUserARY.ToString();
txtCropLeft.Text = Global.Config.DispCropLeft.ToString();
txtCropTop.Text = Global.Config.DispCropTop.ToString();
txtCropRight.Text = Global.Config.DispCropRight.ToString();
txtCropBottom.Text = Global.Config.DispCropBottom.ToString();
RefreshAspectRatioOptions();
if (OSTailoredCode.IsUnixHost)
{
// Disable SlimDX on Unix
rbD3D9.Enabled = false;
rbD3D9.AutoCheck = false;
cbAlternateVsync.Enabled = false;
label13.Enabled = false;
label8.Enabled = false;
}
}
private void btnOk_Click(object sender, EventArgs e)
{
if (rbNone.Checked)
Global.Config.TargetDisplayFilter = 0;
if (rbHq2x.Checked)
Global.Config.TargetDisplayFilter = 1;
if (rbScanlines.Checked)
Global.Config.TargetDisplayFilter = 2;
if (rbUser.Checked)
Global.Config.TargetDisplayFilter = 3;
if (rbFinalFilterNone.Checked)
Global.Config.DispFinalFilter = 0;
if (rbFinalFilterBilinear.Checked)
Global.Config.DispFinalFilter = 1;
if (rbFinalFilterBicubic.Checked)
Global.Config.DispFinalFilter = 2;
Global.Config.DispPrescale = (int)nudPrescale.Value;
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
Global.Config.DispFixAspectRatio = checkLetterbox.Checked;
Global.Config.DispFixScaleInteger = checkPadInteger.Checked;
Global.Config.DispFullscreenHacks = cbFullscreenHacks.Checked;
Global.Config.DispAutoPrescale = cbAutoPrescale.Checked;
Global.Config.DispAlternateVsync = cbAlternateVsync.Checked;
Global.Config.DispChrome_StatusBarWindowed = cbStatusBarWindowed.Checked;
Global.Config.DispChrome_CaptionWindowed = cbCaptionWindowed.Checked;
Global.Config.DispChrome_MenuWindowed = cbMenuWindowed.Checked;
Global.Config.DispChrome_StatusBarFullscreen = cbStatusBarFullscreen.Checked;
Global.Config.DispChrome_MenuFullscreen = cbMenuFullscreen.Checked;
Global.Config.DispChrome_FrameWindowed = trackbarFrameSizeWindowed.Value;
Global.Config.DispChrome_Fullscreen_AutohideMouse = cbFSAutohideMouse.Checked;
Global.Config.DispChrome_AllowDoubleClickFullscreen = cbAllowDoubleclickFullscreen.Checked;
if (rbDisplayFull.Checked) Global.Config.DispSpeedupFeatures = 2;
if (rbDisplayMinimal.Checked) Global.Config.DispSpeedupFeatures = 1;
if (rbDisplayAbsoluteZero.Checked) Global.Config.DispSpeedupFeatures = 0;
if (rbUseRaw.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.None;
else if (rbUseSystem.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.System;
else if (rbUseCustom.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.Custom;
else if (rbUseCustomRatio.Checked)
Global.Config.DispManagerAR = Config.EDispManagerAR.CustomRatio;
if (txtCustomARWidth.Text != "")
int.TryParse(txtCustomARWidth.Text, out Global.Config.DispCustomUserARWidth);
else Global.Config.DispCustomUserARWidth = -1;
if (txtCustomARHeight.Text != "")
int.TryParse(txtCustomARHeight.Text, out Global.Config.DispCustomUserARHeight);
else Global.Config.DispCustomUserARHeight = -1;
if (txtCustomARX.Text != "")
float.TryParse(txtCustomARX.Text, out Global.Config.DispCustomUserARX);
else Global.Config.DispCustomUserARX = -1;
if (txtCustomARY.Text != "")
float.TryParse(txtCustomARY.Text, out Global.Config.DispCustomUserARY);
else Global.Config.DispCustomUserARY = -1;
var oldDisplayMethod = Global.Config.DispMethod;
if(rbOpenGL.Checked)
Global.Config.DispMethod = Config.EDispMethod.OpenGL;
if(rbGDIPlus.Checked)
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
if(rbD3D9.Checked)
Global.Config.DispMethod = Config.EDispMethod.SlimDX9;
int.TryParse(txtCropLeft.Text, out Global.Config.DispCropLeft);
int.TryParse(txtCropTop.Text, out Global.Config.DispCropTop);
int.TryParse(txtCropRight.Text, out Global.Config.DispCropRight);
int.TryParse(txtCropBottom.Text, out Global.Config.DispCropBottom);
if (oldDisplayMethod != Global.Config.DispMethod)
NeedReset = true;
Global.Config.DispUserFilterPath = _pathSelection;
GlobalWin.DisplayManager.RefreshUserShader();
DialogResult = DialogResult.OK;
Close();
}
void RefreshState()
{
lblUserFilterName.Text = Path.GetFileNameWithoutExtension(_pathSelection);
}
private void btnSelectUserFilter_Click(object sender, EventArgs e)
{
using var ofd = new OpenFileDialog
{
Filter = ".CGP (*.cgp)|*.cgp",
FileName = _pathSelection
};
if (ofd.ShowDialog() == DialogResult.OK)
{
rbUser.Checked = true;
var choice = Path.GetFullPath(ofd.FileName);
//test the preset
using (var stream = File.OpenRead(choice))
{
var cgp = new BizHawk.Client.EmuHawk.Filters.RetroShaderPreset(stream);
if (cgp.ContainsGLSL)
{
MessageBox.Show("Specified CGP contains references to .glsl files. This is illegal. Use .cg");
return;
}
//try compiling it
bool ok = false;
string errors = "";
try
{
var filter = new BizHawk.Client.EmuHawk.Filters.RetroShaderChain(GlobalWin.GL, cgp, Path.GetDirectoryName(choice));
ok = filter.Available;
errors = filter.Errors;
}
catch {}
if (!ok)
{
using var errorForm = new ExceptionBox(errors);
errorForm.ShowDialog();
return;
}
}
_pathSelection = choice;
RefreshState();
}
}
private void checkLetterbox_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
private void checkPadInteger_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
private void rbUseRaw_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
private void rbUseSystem_CheckedChanged(object sender, EventArgs e)
{
RefreshAspectRatioOptions();
}
void RefreshAspectRatioOptions()
{
grpARSelection.Enabled = checkLetterbox.Checked;
checkPadInteger.Enabled = checkLetterbox.Checked;
}
public void tbScanlineIntensity_Scroll(object sender, EventArgs e)
{
Global.Config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
int scanlines = Global.Config.TargetScanlineFilterIntensity;
float percentage = (float) scanlines / 256 * 100;
lblScanlines.Text = $"{percentage:F2}%";
}
private void TrackBarFrameSizeWindowed_ValueChanged(object sender, EventArgs e)
{
SyncTrackBar();
}
void SyncTrackBar()
{
if (trackbarFrameSizeWindowed.Value == 0)
{
lblFrameTypeWindowed.Text = "None";
}
if (trackbarFrameSizeWindowed.Value == 1)
{
lblFrameTypeWindowed.Text = "Thin";
}
if (trackbarFrameSizeWindowed.Value == 2)
{
lblFrameTypeWindowed.Text = "Thick";
}
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://tasvideos.org/Bizhawk/DisplayConfig.html");
}
private void label13_Click(object sender, EventArgs e)
{
cbAlternateVsync.Checked ^= true;
}
private void btnDefaults_Click(object sender, EventArgs e)
{
nudPrescale.Value = 1;
rbNone.Checked = true;
cbAutoPrescale.Checked = true;
rbFinalFilterBilinear.Checked = true;
checkLetterbox.Checked = true;
rbUseSystem.Checked = true;
}
}
}

View File

@ -1,132 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, 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="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<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>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: 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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<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:sequence>
<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="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<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>
</data>
<data name="label1.Text" xml:space="preserve">
<value>For Windows operating systems &gt;= 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>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, 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="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<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>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: 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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<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:sequence>
<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="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<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>
</data>
<data name="label1.Text" xml:space="preserve">
<value>For Windows operating systems &gt;= 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>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>