Misc cleanups in tool dialogs - mostly the use of expression body (C#6/C#7isms)

This commit is contained in:
adelikat 2019-10-29 09:27:56 -05:00
parent 0b965dffc5
commit d65092e967
23 changed files with 92 additions and 232 deletions

View File

@ -1,14 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Common;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
@ -16,7 +8,7 @@ namespace BizHawk.Client.EmuHawk
public partial class BarcodeEntry : Form, IToolForm
{
[RequiredService]
private DatachBarcode reader { get; set; }
private DatachBarcode Reader { get; set; }
public BarcodeEntry()
{
@ -45,17 +37,13 @@ namespace BizHawk.Client.EmuHawk
return true;
}
public bool UpdateBefore
{
get { return false; }
}
public bool UpdateBefore => false;
#endregion
private void textBox1_TextChanged(object sender, EventArgs e)
{
string why;
if (!DatachBarcode.ValidString(textBox1.Text, out why))
if (!DatachBarcode.ValidString(textBox1.Text, out var why))
{
label3.Text = $"Invalid: {why}";
label3.Visible = true;
@ -70,7 +58,7 @@ namespace BizHawk.Client.EmuHawk
private void button1_Click(object sender, EventArgs e)
{
reader.Transfer(textBox1.Text);
Reader.Transfer(textBox1.Text);
}
}
}

View File

@ -41,12 +41,9 @@ namespace BizHawk.Client.EmuHawk
private int? _value;
private int? _compare;
public int? Address { get { return _address; } }
public int? Value { get { return _value; } }
public int? Compare { get { return _compare; } }
public bool AskSaveChanges() { return true; }
public bool UpdateBefore { get { return false; } }
public bool UpdateBefore => false;
public void Restart()
{
if (Emulator.SystemId != "NES")

View File

@ -1,15 +1,9 @@
using System;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Linq;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Common;
@ -27,7 +21,7 @@ namespace BizHawk.Client.EmuHawk
}
public bool AskSaveChanges() { return true; }
public bool UpdateBefore { get { return true; } }
public bool UpdateBefore => true;
public void Restart()
{
@ -48,12 +42,12 @@ namespace BizHawk.Client.EmuHawk
//http://www.phy.mtu.edu/~suits/notefreqs.html
//begins at C0. ends at B8
static readonly float[] freqtbl = new[] {0,
static readonly float[] freqtbl = {0,
16.35f,17.32f,18.35f,19.45f,20.6f,21.83f,23.12f,24.5f,25.96f,27.5f,29.14f,30.87f,32.7f,34.65f,36.71f,38.89f,41.2f,43.65f,46.25f,49f,51.91f,55f,58.27f,61.74f,65.41f,69.3f,73.42f,77.78f,82.41f,87.31f,92.5f,98f,103.83f,110f,116.54f,123.47f,130.81f,138.59f,146.83f,155.56f,164.81f,174.61f,185f,196f,207.65f,220f,233.08f,246.94f,261.63f,277.18f,293.66f,311.13f,329.63f,349.23f,369.99f,392f,415.3f,440f,466.16f,493.88f,523.25f,554.37f,587.33f,622.25f,659.25f,698.46f,739.99f,783.99f,830.61f,880f,932.33f,987.77f,1046.5f,1108.73f,1174.66f,1244.51f,1318.51f,1396.91f,1479.98f,1567.98f,1661.22f,1760f,1864.66f,1975.53f,2093f,2217.46f,2349.32f,2489.02f,2637.02f,2793.83f,2959.96f,3135.96f,3322.44f,3520f,3729.31f,3951.07f,4186.01f,4434.92f,4698.63f,4978.03f,5274.04f,5587.65f,5919.91f,6271.93f,6644.88f,7040f,7458.62f,7902.13f,
1000000
};
static readonly string[] noteNames = new[] { "C-", "C#", "D-", "D#", "E-", "F-", "F#", "G-", "G#", "A-", "A#", "B-" };
static readonly string[] noteNames = { "C-", "C#", "D-", "D#", "E-", "F-", "F#", "G-", "G#", "A-", "A#", "B-" };
string NameForNote(int note)
{
@ -115,8 +109,10 @@ namespace BizHawk.Client.EmuHawk
private void btnExport_Click(object sender, EventArgs e)
{
//acquire target
var sfd = new SaveFileDialog();
sfd.Filter = "XRNS (*.xrns)|*.xrns";
var sfd = new SaveFileDialog
{
Filter = "XRNS (*.xrns)|*.xrns"
};
if (sfd.ShowDialog() != System.Windows.Forms.DialogResult.OK)
return;

View File

@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Common;
@ -21,8 +19,8 @@ namespace BizHawk.Client.EmuHawk
[ConfigPersist]
private int RefreshRateConfig
{
get { return RefreshRate.Value; }
set { RefreshRate.Value = value; }
get => RefreshRate.Value;
set => RefreshRate.Value = value;
}
int scanline;
@ -40,7 +38,7 @@ namespace BizHawk.Client.EmuHawk
#region Public API
public bool AskSaveChanges() { return true; }
public bool UpdateBefore { get { return true; } }
public bool UpdateBefore => true;
public void Restart()
{
@ -238,10 +236,7 @@ namespace BizHawk.Client.EmuHawk
private void NESNameTableViewer_FormClosed(object sender, FormClosedEventArgs e)
{
if (_ppu != null)
{
_ppu.RemoveCallback1();
}
_ppu?.RemoveCallback1();
}
private void ScanlineTextbox_TextChanged(object sender, EventArgs e)

View File

@ -1,12 +1,9 @@
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Common;
using System.Collections.Generic;
namespace BizHawk.Client.EmuHawk
{
@ -33,15 +30,15 @@ namespace BizHawk.Client.EmuHawk
[ConfigPersist]
private int RefreshRateConfig
{
get { return RefreshRate.Value; }
set { RefreshRate.Value = value; }
get => RefreshRate.Value;
set => RefreshRate.Value = value;
}
private bool _chrromview = false;
private bool _chrromview;
[ConfigPersist]
private bool ChrRomView
{
get { return _chrromview; }
get => _chrromview;
set { _chrromview = value; CalculateFormSize(); }
}
@ -61,7 +58,7 @@ namespace BizHawk.Client.EmuHawk
#region Public API
public bool AskSaveChanges() { return true; }
public bool UpdateBefore { get { return true; } }
public bool UpdateBefore => true;
public void NewUpdate(ToolFormUpdateType type) { }
public void UpdateValues()
@ -790,16 +787,13 @@ namespace BizHawk.Client.EmuHawk
private void NesPPU_FormClosed(object sender, FormClosedEventArgs e)
{
if (_ppu != null)
{
_ppu.RemoveCallback2();
}
_ppu?.RemoveCallback2();
}
#endregion
MemoryDomain CHRROM;
byte[] chrromcache = new byte[8192];
readonly byte[] chrromcache = new byte[8192];
private void cHRROMTileViewerToolStripMenuItem_Click(object sender, EventArgs e)
{

View File

@ -12,12 +12,9 @@ namespace BizHawk.Client.EmuHawk
{
public class Palette
{
public int Address { get; private set; }
public int Address { get; }
public int Value { get; set; }
public Color Color
{
get { return Color.FromArgb(Value); }
}
public Color Color => Color.FromArgb(Value);
public Palette(int address)
{

View File

@ -29,10 +29,7 @@ namespace BizHawk.Client.EmuHawk
private void Display(Graphics g)
{
unchecked
{
g.DrawImage(sprites, 1, 1);
}
g.DrawImage(sprites, 1, 1);
}
private void SpriteViewer_Paint(object sender, PaintEventArgs e)

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Forms;
@ -16,14 +15,8 @@ namespace BizHawk.Client.EmuHawk
[ConfigPersist]
private int RefreshRateConfig
{
get
{
return RefreshRate.Value;
}
set
{
RefreshRate.Value = Math.Max(Math.Min(value, RefreshRate.Maximum), RefreshRate.Minimum);
}
get => RefreshRate.Value;
set => RefreshRate.Value = Math.Max(Math.Min(value, RefreshRate.Maximum), RefreshRate.Minimum);
}
private int _vdcType;
@ -41,7 +34,7 @@ namespace BizHawk.Client.EmuHawk
#region Public API
public bool AskSaveChanges() { return true; }
public bool UpdateBefore { get { return true; } }
public bool UpdateBefore => true;
public unsafe void Generate()
{

View File

@ -1,18 +1,10 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Common.BufferExtensions;
using BizHawk.Client.Common;
using BizHawk.Emulation.Cores.PCEngine;
using BizHawk.Emulation.Common.Components;
using BizHawk.Emulation.Common;
using ICSharpCode.SharpZipLib.Zip;
@ -33,7 +25,7 @@ namespace BizHawk.Client.EmuHawk
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
}
byte[] waveformTemp = new byte[32 * 2];
readonly byte[] waveformTemp = new byte[32 * 2];
protected override void OnShown(EventArgs e)
{
@ -161,9 +153,9 @@ namespace BizHawk.Client.EmuHawk
public short[] waveform;
}
PSGEntry[] LastSamples = new PSGEntry[8];
List<PSGEntry> PSGEntries = new List<PSGEntry>();
Dictionary<string, PSGEntry> PSGEntryTable = new Dictionary<string, PSGEntry>();
readonly PSGEntry[] LastSamples = new PSGEntry[8];
readonly List<PSGEntry> PSGEntries = new List<PSGEntry>();
readonly Dictionary<string, PSGEntry> PSGEntryTable = new Dictionary<string, PSGEntry>();
public void Restart()
{
@ -174,14 +166,11 @@ namespace BizHawk.Client.EmuHawk
return true;
}
public bool UpdateBefore
{
get { return false; }
}
public bool UpdateBefore => false;
//32*16 samples, 16bit, mono, 8khz (but we'll change the sample rate)
static readonly byte[] emptyWav = new byte[] {
static readonly byte[] emptyWav = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x04, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D, 0x74, 0x20,
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xE0, 0x2E, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00,
0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x04, 0x00, 0x00,

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Emulation.Cores.PCEngine;
@ -50,7 +48,7 @@ namespace BizHawk.Client.EmuHawk
// Do nothing
}
unsafe static void Draw16x16(byte* src, int* dest, int pitch, int* pal)
static unsafe void Draw16x16(byte* src, int* dest, int pitch, int* pal)
{
int inc = pitch - 16;
dest -= inc;
@ -62,7 +60,7 @@ namespace BizHawk.Client.EmuHawk
}
}
unsafe static void Draw8x8(byte* src, int* dest, int pitch, int* pal)
static unsafe void Draw8x8(byte* src, int* dest, int pitch, int* pal)
{
int inc = pitch - 8;
dest -= inc;
@ -125,7 +123,7 @@ namespace BizHawk.Client.EmuHawk
}
}
unsafe static void DrawPalette(Bitmap bmp, int* pal)
static unsafe void DrawPalette(Bitmap bmp, int* pal)
{
var lockdata = bmp.LockBits(new Rectangle(0, 0, 256, 256), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
@ -165,10 +163,7 @@ namespace BizHawk.Client.EmuHawk
return true;
}
public bool UpdateBefore
{
get { return true; }
}
public bool UpdateBefore => true;
#endregion

View File

@ -18,7 +18,7 @@ namespace BizHawk.Client.EmuHawk
{
[RequiredService]
private SMS sms { get; set; }
private VDP vdp { get { return sms.Vdp; } }
private VDP vdp => sms.Vdp;
int palindex = 0;
@ -31,7 +31,7 @@ namespace BizHawk.Client.EmuHawk
bmpViewBG.ChangeBitmapSize(256, 256);
}
unsafe static void Draw8x8(byte* src, int* dest, int pitch, int* pal)
static unsafe void Draw8x8(byte* src, int* dest, int pitch, int* pal)
{
int inc = pitch - 8;
dest -= inc;
@ -43,7 +43,7 @@ namespace BizHawk.Client.EmuHawk
}
}
unsafe static void Draw8x8hv(byte* src, int* dest, int pitch, int* pal, bool hflip, bool vflip)
static unsafe void Draw8x8hv(byte* src, int* dest, int pitch, int* pal, bool hflip, bool vflip)
{
int incx = hflip ? -1 : 1;
int incy = vflip ? -pitch : pitch;
@ -169,10 +169,7 @@ namespace BizHawk.Client.EmuHawk
return true;
}
public bool UpdateBefore
{
get { return true; }
}
public bool UpdateBefore => true;
private void bmpViewPalette_MouseClick(object sender, MouseEventArgs e)
{

View File

@ -40,9 +40,9 @@ namespace BizHawk.Client.EmuHawk
{
public unsafe partial class SNESGraphicsDebugger : Form, IToolFormAutoConfig
{
List<DisplayTypeItem> displayTypeItems = new List<DisplayTypeItem>();
readonly List<DisplayTypeItem> displayTypeItems = new List<DisplayTypeItem>();
public bool UpdateBefore { get { return false; } }
public bool UpdateBefore => false;
public bool AskSaveChanges() { return true; }
[RequiredService]
@ -51,8 +51,8 @@ namespace BizHawk.Client.EmuHawk
[ConfigPersist]
public bool UseUserBackdropColor
{
get { return checkBackdropColor.Checked; }
set { checkBackdropColor.Checked = value; }
get => checkBackdropColor.Checked;
set => checkBackdropColor.Checked = value;
}
[ConfigPersist]
public int UserBackdropColor { get; set; }
@ -116,8 +116,7 @@ namespace BizHawk.Client.EmuHawk
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
if (currentSnesCore != null)
currentSnesCore.ScanlineHookManager.Unregister(this);
currentSnesCore?.ScanlineHookManager.Unregister(this);
currentSnesCore = null;
}
@ -224,7 +223,7 @@ namespace BizHawk.Client.EmuHawk
void RegenerateData()
{
if (gd != null) gd.Dispose();
gd?.Dispose();
gd = null;
if (currentSnesCore == null) return;
gd = NewDecoder();
@ -345,7 +344,7 @@ namespace BizHawk.Client.EmuHawk
}
}
eDisplayType CurrDisplaySelection { get { return (comboDisplayType.SelectedValue as eDisplayType?).Value; } }
eDisplayType CurrDisplaySelection => (comboDisplayType.SelectedValue as eDisplayType?).Value;
//todo - something smarter to cycle through bitmaps without repeatedly trashing them (use the dispose callback on the viewer)
private void RenderView()
@ -527,8 +526,8 @@ namespace BizHawk.Client.EmuHawk
class PaletteTypeItem
{
public SnesColors.ColorType Type { get; private set; }
public string Descr { get; private set; }
public SnesColors.ColorType Type { get; }
public string Descr { get; }
public PaletteTypeItem(string descr, SnesColors.ColorType type)
{
Type = type;

View File

@ -9,7 +9,6 @@ using System.Windows.Forms;
using BizHawk.Client.ApiHawk;
using BizHawk.Client.Common;
using BizHawk.Client.EmuHawk;
using BizHawk.Client.EmuHawk.CoreExtensions;
using BizHawk.Common;
using BizHawk.Common.ReflectionExtensions;

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
using System.Drawing;
@ -19,24 +18,16 @@ namespace BizHawk.Client.EmuHawk
PadControls.ForEach(c => c.UpdateValues());
}
private List<IVirtualPadControl> PadControls
{
get
{
return PadBox.Controls
.OfType<IVirtualPadControl>()
.ToList();
}
}
private List<IVirtualPadControl> PadControls =>
PadBox.Controls
.OfType<IVirtualPadControl>()
.ToList();
public string PadSchemaDisplayName { get { return _schema.DisplayName; } }
public string PadSchemaDisplayName => _schema.DisplayName;
public bool ReadOnly
{
get
{
return _readOnly;
}
get => _readOnly;
set
{

View File

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
@ -23,15 +22,10 @@ namespace BizHawk.Client.EmuHawk
private bool _readOnly;
private List<VirtualPad> Pads
{
get
{
return ControllerPanel.Controls
.OfType<VirtualPad>()
.ToList();
}
}
private List<VirtualPad> Pads =>
ControllerPanel.Controls
.OfType<VirtualPad>()
.ToList();
public bool Readonly
{

View File

@ -17,10 +17,7 @@ namespace BizHawk.Client.EmuHawk
private bool _isSet = false;
private bool IsSet
{
get
{
return _isSet;
}
get => _isSet;
set
{
@ -62,10 +59,7 @@ namespace BizHawk.Client.EmuHawk
public bool ReadOnly
{
get
{
return _readonly;
}
get => _readonly;
set
{
@ -102,10 +96,7 @@ namespace BizHawk.Client.EmuHawk
public string DisplayName
{
get
{
return _displayName;
}
get => _displayName;
set
{
@ -119,10 +110,7 @@ namespace BizHawk.Client.EmuHawk
public int MaxValue
{
get
{
return _maxValue;
}
get => _maxValue;
set
{
@ -137,10 +125,7 @@ namespace BizHawk.Client.EmuHawk
public int MinValue
{
get
{
return _minValue;
}
get => _minValue;
set
{
@ -155,10 +140,7 @@ namespace BizHawk.Client.EmuHawk
public Orientation Orientation
{
get
{
return AnalogTrackBar.Orientation;
}
get => AnalogTrackBar.Orientation;
set
{
@ -207,10 +189,7 @@ namespace BizHawk.Client.EmuHawk
public int CurrentValue
{
get
{
return AnalogTrackBar.Value;
}
get => AnalogTrackBar.Value;
set
{

View File

@ -1,10 +1,8 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
using System.Windows;
using BizHawk.Common.NumberExtensions;
namespace BizHawk.Client.EmuHawk
@ -31,8 +29,8 @@ namespace BizHawk.Client.EmuHawk
manualTheta.ValueChanged += PolarNumeric_Changed;
}
public float[] RangeX = new float[] { -128f, 0.0f, 127f };
public float[] RangeY = new float[] { -128f, 0.0f, 127f };
public float[] RangeX = { -128f, 0.0f, 127f };
public float[] RangeY = { -128f, 0.0f, 127f };
private bool ReverseX;
private bool ReverseY;
@ -112,10 +110,7 @@ namespace BizHawk.Client.EmuHawk
public bool ReadOnly
{
get
{
return _readonly;
}
get => _readonly;
set
{

View File

@ -57,10 +57,7 @@ namespace BizHawk.Client.EmuHawk
public bool ReadOnly
{
get
{
return _readonly;
}
get => _readonly;
set
{
@ -123,10 +120,7 @@ namespace BizHawk.Client.EmuHawk
public bool RightClicked
{
get
{
return !ReadOnly && _rightClicked;
}
get => !ReadOnly && _rightClicked;
set
{

View File

@ -51,7 +51,6 @@
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Discs";
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
//
// lvDiscs
//

View File

@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Client.Common;
@ -29,7 +24,7 @@ namespace BizHawk.Client.EmuHawk
object _ownerEmulator;
public object OwnerEmulator
{
get { return _ownerEmulator; }
get => _ownerEmulator;
set
{
_ownerEmulator = value;
@ -59,8 +54,7 @@ namespace BizHawk.Client.EmuHawk
int idx = 0;
foreach (var button in buttons)
{
var lvi = new ListViewItem();
lvi.Text = idx.ToString();
var lvi = new ListViewItem { Text = idx.ToString() };
lvi.SubItems.Add(button);
lvDiscs.Items.Add(lvi);
idx++;
@ -105,9 +99,9 @@ namespace BizHawk.Client.EmuHawk
enableDiscs = btnOpen.Checked;
//since user hasnt ever needed to set the disc, make sure it's set here
//UPDATE: do it below
//Global.StickyXORAdapter.SetFloat(_discSelectName, psx.CurrentDiscIndexMounted);
// since user hasn't ever needed to set the disc, make sure it's set here
// UPDATE: do it below
//Global.StickyXORAdapter.SetFloat(_discSelectName, psx.CurrentDiscIndexMounted);
}
else
{
@ -128,8 +122,8 @@ namespace BizHawk.Client.EmuHawk
}
}
//make sure we try to keep something selected here, for clarity.
//but maybe later we'll just make it so that unselecting means no disc and dont display the disc 0
// make sure we try to keep something selected here, for clarity.
// but maybe later we'll just make it so that unselecting means no disc and don't display the disc 0
if (lvDiscs.SelectedIndices.Count == 0)
lvDiscs.SelectedIndices.Add(0);
}
@ -143,11 +137,6 @@ namespace BizHawk.Client.EmuHawk
#endregion //IVirtualPadControl
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void lvDiscs_SelectedIndexChanged(object sender, EventArgs e)
{
//not a valid way to fight unselection, it results in craptons of ping-ponging logic and eventual malfunction

View File

@ -76,10 +76,7 @@ namespace BizHawk.Client.EmuHawk
public bool ReadOnly
{
get
{
return _readonly;
}
get => _readonly;
set
{
@ -106,14 +103,11 @@ namespace BizHawk.Client.EmuHawk
#endregion
// Size of the extra controls to the right / bottom of the target panel at 96 DPI
private Size PaddingSize
{
get { return new Size(0, 30); }
}
private Size PaddingSize => new Size(0, 30);
public Size TargetSize
{
get { return TargetPanel.Size; }
get => TargetPanel.Size;
set
{
TargetPanel.Size = value;
@ -171,11 +165,7 @@ namespace BizHawk.Client.EmuHawk
public int X
{
get
{
return _overrideX ?? (int)(Global.StickyXORAdapter.GetFloat(XName) / MultiplierX);
}
get => _overrideX ?? (int)(Global.StickyXORAdapter.GetFloat(XName) / MultiplierX);
set
{
if (value < 0)
@ -198,11 +188,7 @@ namespace BizHawk.Client.EmuHawk
}
public int Y
{
get
{
return _overrideY ?? (int)(Global.StickyXORAdapter.GetFloat(YName) / MultiplierY);
}
get => _overrideY ?? (int)(Global.StickyXORAdapter.GetFloat(YName) / MultiplierY);
set
{
if (value < 0)

View File

@ -16,10 +16,7 @@ namespace BizHawk.Client.EmuHawk
public int X
{
get
{
return _x;
}
get => _x;
set
{
_x = RangeX.Constrain(value);
@ -29,10 +26,7 @@ namespace BizHawk.Client.EmuHawk
public int Y
{
get
{
return _y;
}
get => _y;
set
{
_y = RangeY.Constrain(value);

View File

@ -230,7 +230,9 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Multidisk/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mupen/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nametable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nametables/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nintendulator/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Numerics/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=nvidia/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=opengl/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Overdump/@EntryIndexedValue">True</s:Boolean>
@ -261,6 +263,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unthrottled/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Vectrex/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Virtua/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Virtualpad/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Vsync/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Winform/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=winforms/@EntryIndexedValue">True</s:Boolean>