2019-12-17 00:41:54 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using BizHawk.Client.Common;
|
2020-02-04 01:56:46 +00:00
|
|
|
|
using BizHawk.Client.EmuHawk.Filters;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
using BizHawk.Common;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
|
|
|
{
|
|
|
|
|
public partial class DisplayConfig : Form
|
|
|
|
|
{
|
2019-12-17 00:45:40 +00:00
|
|
|
|
private readonly Config _config;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
private string _pathSelection;
|
|
|
|
|
|
|
|
|
|
public bool NeedReset { get; set; }
|
|
|
|
|
|
|
|
|
|
public DisplayConfig(Config config)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config = config;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
rbNone.Checked = _config.TargetDisplayFilter == 0;
|
|
|
|
|
rbHq2x.Checked = _config.TargetDisplayFilter == 1;
|
|
|
|
|
rbScanlines.Checked = _config.TargetDisplayFilter == 2;
|
|
|
|
|
rbUser.Checked = _config.TargetDisplayFilter == 3;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_pathSelection = _config.DispUserFilterPath ?? "";
|
2019-12-17 00:41:54 +00:00
|
|
|
|
RefreshState();
|
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
rbFinalFilterNone.Checked = _config.DispFinalFilter == 0;
|
|
|
|
|
rbFinalFilterBilinear.Checked = _config.DispFinalFilter == 1;
|
|
|
|
|
rbFinalFilterBicubic.Checked = _config.DispFinalFilter == 2;
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
tbScanlineIntensity.Value = _config.TargetScanlineFilterIntensity;
|
|
|
|
|
checkLetterbox.Checked = _config.DispFixAspectRatio;
|
|
|
|
|
checkPadInteger.Checked = _config.DispFixScaleInteger;
|
|
|
|
|
cbFullscreenHacks.Checked = _config.DispFullscreenHacks;
|
2019-12-17 00:45:40 +00:00
|
|
|
|
cbAutoPrescale.Checked = _config.DispAutoPrescale;
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
cbAlternateVsync.Checked = _config.DispAlternateVsync;
|
2019-12-17 00:45:40 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (_config.DispSpeedupFeatures == 2) rbDisplayFull.Checked = true;
|
|
|
|
|
if (_config.DispSpeedupFeatures == 1) rbDisplayMinimal.Checked = true;
|
|
|
|
|
if (_config.DispSpeedupFeatures == 0) rbDisplayAbsoluteZero.Checked = true;
|
2019-12-17 00:45:40 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
rbOpenGL.Checked = _config.DispMethod == EDispMethod.OpenGL;
|
|
|
|
|
rbGDIPlus.Checked = _config.DispMethod == EDispMethod.GdiPlus;
|
|
|
|
|
rbD3D9.Checked = _config.DispMethod == EDispMethod.SlimDX9;
|
2019-12-17 00:45:40 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
cbStatusBarWindowed.Checked = _config.DispChromeStatusBarWindowed;
|
|
|
|
|
cbCaptionWindowed.Checked = _config.DispChromeCaptionWindowed;
|
|
|
|
|
cbMenuWindowed.Checked = _config.DispChromeMenuWindowed;
|
|
|
|
|
cbStatusBarFullscreen.Checked = _config.DispChromeStatusBarFullscreen;
|
|
|
|
|
cbMenuFullscreen.Checked = _config.DispChromeMenuFullscreen;
|
|
|
|
|
trackbarFrameSizeWindowed.Value = _config.DispChromeFrameWindowed;
|
2020-01-25 16:57:31 +00:00
|
|
|
|
cbFSAutohideMouse.Checked = _config.DispChromeFullscreenAutohideMouse;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
SyncTrackBar();
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
cbAllowDoubleclickFullscreen.Checked = _config.DispChromeAllowDoubleClickFullscreen;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
nudPrescale.Value = _config.DispPrescale;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2020-01-21 14:05:56 +00:00
|
|
|
|
if (_config.DispManagerAR == EDispManagerAR.None)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
rbUseRaw.Checked = true;
|
2020-01-21 14:05:56 +00:00
|
|
|
|
else if (_config.DispManagerAR == EDispManagerAR.System)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
rbUseSystem.Checked = true;
|
2020-01-21 14:05:56 +00:00
|
|
|
|
else if (_config.DispManagerAR == EDispManagerAR.Custom)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
rbUseCustom.Checked = true;
|
2020-01-21 14:05:56 +00:00
|
|
|
|
else if (_config.DispManagerAR == EDispManagerAR.CustomRatio)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
rbUseCustomRatio.Checked = true;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
if(_config.DispCustomUserARWidth != -1)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
txtCustomARWidth.Text = _config.DispCustomUserARWidth.ToString();
|
2019-12-17 00:45:40 +00:00
|
|
|
|
if (_config.DispCustomUserARHeight != -1)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
txtCustomARHeight.Text = _config.DispCustomUserARHeight.ToString();
|
2020-01-25 16:57:31 +00:00
|
|
|
|
if (_config.DispCustomUserArx != -1)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
txtCustomARX.Text = _config.DispCustomUserArx.ToString();
|
2020-01-25 16:57:31 +00:00
|
|
|
|
if (_config.DispCustomUserAry != -1)
|
2020-04-14 00:53:21 +00:00
|
|
|
|
txtCustomARY.Text = _config.DispCustomUserAry.ToString();
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
txtCropLeft.Text = _config.DispCropLeft.ToString();
|
|
|
|
|
txtCropTop.Text = _config.DispCropTop.ToString();
|
|
|
|
|
txtCropRight.Text = _config.DispCropRight.ToString();
|
|
|
|
|
txtCropBottom.Text = _config.DispCropBottom.ToString();
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
|
|
|
|
RefreshAspectRatioOptions();
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (OSTailoredCode.IsUnixHost)
|
|
|
|
|
{
|
|
|
|
|
// Disable SlimDX on Unix
|
|
|
|
|
rbD3D9.Enabled = false;
|
|
|
|
|
rbD3D9.AutoCheck = false;
|
|
|
|
|
cbAlternateVsync.Enabled = false;
|
|
|
|
|
label13.Enabled = false;
|
|
|
|
|
label8.Enabled = false;
|
|
|
|
|
}
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void btnOk_Click(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (rbNone.Checked)
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.TargetDisplayFilter = 0;
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (rbHq2x.Checked)
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.TargetDisplayFilter = 1;
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (rbScanlines.Checked)
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.TargetDisplayFilter = 2;
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (rbUser.Checked)
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.TargetDisplayFilter = 3;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
|
|
|
|
if (rbFinalFilterNone.Checked)
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.DispFinalFilter = 0;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
if (rbFinalFilterBilinear.Checked)
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.DispFinalFilter = 1;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
if (rbFinalFilterBicubic.Checked)
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.DispFinalFilter = 2;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
_config.DispPrescale = (int)nudPrescale.Value;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
_config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
|
|
|
|
_config.DispFixAspectRatio = checkLetterbox.Checked;
|
|
|
|
|
_config.DispFixScaleInteger = checkPadInteger.Checked;
|
|
|
|
|
_config.DispFullscreenHacks = cbFullscreenHacks.Checked;
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.DispAutoPrescale = cbAutoPrescale.Checked;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
_config.DispAlternateVsync = cbAlternateVsync.Checked;
|
|
|
|
|
|
|
|
|
|
_config.DispChromeStatusBarWindowed = cbStatusBarWindowed.Checked;
|
|
|
|
|
_config.DispChromeCaptionWindowed = cbCaptionWindowed.Checked;
|
|
|
|
|
_config.DispChromeMenuWindowed = cbMenuWindowed.Checked;
|
|
|
|
|
_config.DispChromeStatusBarFullscreen = cbStatusBarFullscreen.Checked;
|
|
|
|
|
_config.DispChromeMenuFullscreen = cbMenuFullscreen.Checked;
|
|
|
|
|
_config.DispChromeFrameWindowed = trackbarFrameSizeWindowed.Value;
|
2020-01-25 16:57:31 +00:00
|
|
|
|
_config.DispChromeFullscreenAutohideMouse = cbFSAutohideMouse.Checked;
|
2020-04-14 00:53:21 +00:00
|
|
|
|
_config.DispChromeAllowDoubleClickFullscreen = cbAllowDoubleclickFullscreen.Checked;
|
|
|
|
|
|
|
|
|
|
if (rbDisplayFull.Checked) _config.DispSpeedupFeatures = 2;
|
|
|
|
|
if (rbDisplayMinimal.Checked) _config.DispSpeedupFeatures = 1;
|
|
|
|
|
if (rbDisplayAbsoluteZero.Checked) _config.DispSpeedupFeatures = 0;
|
|
|
|
|
|
|
|
|
|
if (rbUseRaw.Checked)
|
|
|
|
|
_config.DispManagerAR = EDispManagerAR.None;
|
|
|
|
|
else if (rbUseSystem.Checked)
|
|
|
|
|
_config.DispManagerAR = EDispManagerAR.System;
|
|
|
|
|
else if (rbUseCustom.Checked)
|
|
|
|
|
_config.DispManagerAR = EDispManagerAR.Custom;
|
|
|
|
|
else if (rbUseCustomRatio.Checked)
|
|
|
|
|
_config.DispManagerAR = EDispManagerAR.CustomRatio;
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(txtCustomARWidth.Text))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (int.TryParse(txtCustomARWidth.Text, out int dispCustomUserARWidth))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserARWidth = dispCustomUserARWidth;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserARWidth = -1;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (string.IsNullOrWhiteSpace(txtCustomARHeight.Text))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (int.TryParse(txtCustomARHeight.Text, out int dispCustomUserARHeight))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserARHeight = dispCustomUserARHeight;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserARHeight = -1;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (string.IsNullOrWhiteSpace(txtCustomARX.Text))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (float.TryParse(txtCustomARX.Text, out float dispCustomUserArx))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserArx = dispCustomUserArx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserArx = -1;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (string.IsNullOrWhiteSpace(txtCustomARY.Text))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (float.TryParse(txtCustomARY.Text, out float dispCustomUserAry))
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserAry = dispCustomUserAry;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_config.DispCustomUserAry = -1;
|
|
|
|
|
}
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
var oldDisplayMethod = _config.DispMethod;
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if(rbOpenGL.Checked)
|
|
|
|
|
_config.DispMethod = EDispMethod.OpenGL;
|
|
|
|
|
if(rbGDIPlus.Checked)
|
|
|
|
|
_config.DispMethod = EDispMethod.GdiPlus;
|
|
|
|
|
if(rbD3D9.Checked)
|
|
|
|
|
_config.DispMethod = EDispMethod.SlimDX9;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2020-01-25 18:35:33 +00:00
|
|
|
|
if (int.TryParse(txtCropLeft.Text, out int dispCropLeft))
|
|
|
|
|
{
|
|
|
|
|
_config.DispCropLeft = dispCropLeft;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (int.TryParse(txtCropTop.Text, out int dispCropTop))
|
|
|
|
|
{
|
|
|
|
|
_config.DispCropTop = dispCropTop;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (int.TryParse(txtCropRight.Text, out int dispCropRight))
|
|
|
|
|
{
|
|
|
|
|
_config.DispCropRight = dispCropRight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (int.TryParse(txtCropBottom.Text, out int dispCropBottom))
|
|
|
|
|
{
|
|
|
|
|
_config.DispCropBottom = dispCropBottom;
|
|
|
|
|
}
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
if (oldDisplayMethod != _config.DispMethod)
|
2020-01-25 18:35:33 +00:00
|
|
|
|
{
|
2019-12-17 00:41:54 +00:00
|
|
|
|
NeedReset = true;
|
2020-01-25 18:35:33 +00:00
|
|
|
|
}
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
2019-12-17 00:45:40 +00:00
|
|
|
|
_config.DispUserFilterPath = _pathSelection;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
|
|
|
|
|
DialogResult = DialogResult.OK;
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-25 18:35:33 +00:00
|
|
|
|
private void RefreshState()
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
lblUserFilterName.Text = Path.GetFileNameWithoutExtension(_pathSelection);
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void btnSelectUserFilter_Click(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
using var ofd = new OpenFileDialog
|
|
|
|
|
{
|
2020-02-20 21:04:30 +00:00
|
|
|
|
Filter = new FilesystemFilter(".CGP Files", new[] { "cgp" }).ToString(),
|
2019-12-17 00:41:54 +00:00
|
|
|
|
FileName = _pathSelection
|
|
|
|
|
};
|
|
|
|
|
if (ofd.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
rbUser.Checked = true;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
var choice = Path.GetFullPath(ofd.FileName);
|
|
|
|
|
|
|
|
|
|
//test the preset
|
|
|
|
|
using (var stream = File.OpenRead(choice))
|
|
|
|
|
{
|
2020-02-04 01:56:46 +00:00
|
|
|
|
var cgp = new RetroShaderPreset(stream);
|
2019-12-31 17:14:10 +00:00
|
|
|
|
if (cgp.ContainsGlsl)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("Specified CGP contains references to .glsl files. This is illegal. Use .cg");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-25 18:35:33 +00:00
|
|
|
|
// try compiling it
|
2019-12-17 00:41:54 +00:00
|
|
|
|
bool ok = false;
|
|
|
|
|
string errors = "";
|
|
|
|
|
try
|
|
|
|
|
{
|
2020-02-04 01:56:46 +00:00
|
|
|
|
var filter = new RetroShaderChain(GlobalWin.GL, cgp, Path.GetDirectoryName(choice));
|
2019-12-17 00:41:54 +00:00
|
|
|
|
ok = filter.Available;
|
|
|
|
|
errors = filter.Errors;
|
|
|
|
|
}
|
|
|
|
|
catch {}
|
|
|
|
|
if (!ok)
|
|
|
|
|
{
|
|
|
|
|
using var errorForm = new ExceptionBox(errors);
|
|
|
|
|
errorForm.ShowDialog();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_pathSelection = choice;
|
|
|
|
|
RefreshState();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void checkLetterbox_CheckedChanged(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
RefreshAspectRatioOptions();
|
|
|
|
|
}
|
2020-02-04 01:56:46 +00:00
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void checkPadInteger_CheckedChanged(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
RefreshAspectRatioOptions();
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void rbUseRaw_CheckedChanged(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
RefreshAspectRatioOptions();
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void rbUseSystem_CheckedChanged(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
RefreshAspectRatioOptions();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void RefreshAspectRatioOptions()
|
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
grpARSelection.Enabled = checkLetterbox.Checked;
|
|
|
|
|
checkPadInteger.Enabled = checkLetterbox.Checked;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
public void tbScanlineIntensity_Scroll(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
_config.TargetScanlineFilterIntensity = tbScanlineIntensity.Value;
|
2019-12-17 00:45:40 +00:00
|
|
|
|
int scanlines = _config.TargetScanlineFilterIntensity;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
float percentage = (float) scanlines / 256 * 100;
|
2020-04-14 00:53:21 +00:00
|
|
|
|
lblScanlines.Text = $"{percentage:F2}%";
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void TrackBarFrameSizeWindowed_ValueChanged(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
SyncTrackBar();
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-04 01:56:46 +00:00
|
|
|
|
private void SyncTrackBar()
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (trackbarFrameSizeWindowed.Value == 0)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
lblFrameTypeWindowed.Text = "None";
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (trackbarFrameSizeWindowed.Value == 1)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
lblFrameTypeWindowed.Text = "Thin";
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
if (trackbarFrameSizeWindowed.Value == 2)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
lblFrameTypeWindowed.Text = "Thick";
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
|
|
|
|
System.Diagnostics.Process.Start("http://tasvideos.org/Bizhawk/DisplayConfig.html");
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-14 00:53:21 +00:00
|
|
|
|
private void label13_Click(object sender, EventArgs e)
|
2019-12-17 00:41:54 +00:00
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
cbAlternateVsync.Checked ^= true;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnDefaults_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2020-04-14 00:53:21 +00:00
|
|
|
|
nudPrescale.Value = 1;
|
|
|
|
|
rbNone.Checked = true;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
cbAutoPrescale.Checked = true;
|
|
|
|
|
rbFinalFilterBilinear.Checked = true;
|
2020-04-14 00:53:21 +00:00
|
|
|
|
checkLetterbox.Checked = true;
|
|
|
|
|
rbUseSystem.Checked = true;
|
2019-12-17 00:41:54 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|