Skip to content

Commit c9aa47f

Browse files
Revert "Merge branch 'dosbox' of github.com:SergioMartin86/BizHawk into dosbox"
This reverts commit 6809497, reversing changes made to 9a9525a.
1 parent e04969e commit c9aa47f

File tree

35 files changed

+1253
-1430
lines changed

35 files changed

+1253
-1430
lines changed

Assets/dll/dsda.wbx.zst

2.44 KB
Binary file not shown.

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<PackageVersion Include="Microsoft.Data.Sqlite.Core" Version="8.0.4" />
1919
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
2020
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
21-
<PackageVersion Include="MSTest" Version="3.8.3" />
21+
<PackageVersion Include="MSTest" Version="3.7.1" />
2222
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
2323
<PackageVersion Include="Nullable" Version="1.3.1" />
2424
<PackageVersion Include="PolySharp" Version="1.15.0" />

Dist/.BuildTestInConfigX.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ config="$1"
77
shift
88
Dist/.InvokeCLIOnMainSln.sh "test" "$config" \
99
-l "junit;LogFilePath=$PWD/test_output/{assembly}.coverage.xml;MethodFormat=Class;FailureBodyFormat=Verbose" \
10+
--test-adapter-path . \
1011
"$@"

Dist/deps.nix

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,27 @@
1717
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "9.0.0"; sha256 = "0mbkcs54i5i7rs0sqimbyzijzylvpb94xm9ycfvmlz10c4wwvi86"; })
1818
(fetchNuGet { pname = "Microsoft.Bcl.HashCode"; version = "6.0.0"; sha256 = "0sxxkhqn3qfag8s43gc5krny6m7cwfpdgxpxslbwg35zn2xb5fgk"; })
1919
(fetchNuGet { pname = "Microsoft.CodeAnalysis.BannedApiAnalyzers"; version = "3.3.4"; sha256 = "1vzrni7n94f17bzc13lrvcxvgspx9s25ap1p005z6i1ikx6wgx30"; })
20-
(fetchNuGet { pname = "Microsoft.CodeCoverage"; version = "17.13.0"; sha256 = "1jmvvx1d3gvjmm7777i8kjs0cnbb3q47vvbcsqrr18whxk2wiahq"; })
20+
(fetchNuGet { pname = "Microsoft.CodeCoverage"; version = "17.12.0"; sha256 = "04g551m1svgqf3ydkprvg1wmlaiy3wssdg4x0r6f1l23k9zf4s4l"; })
2121
(fetchNuGet { pname = "Microsoft.CSharp"; version = "4.7.0"; sha256 = "0gd67zlw554j098kabg887b5a6pq9kzavpa3jjy5w53ccjzjfy8j"; })
2222
(fetchNuGet { pname = "Microsoft.Data.Sqlite.Core"; version = "8.0.4"; sha256 = "03i9b45n2vnsv4wdsk6qvjzj1ga2hcli168liyrqfa87l54skckd"; })
23-
(fetchNuGet { pname = "Microsoft.DiaSymReader"; version = "2.0.0"; sha256 = "0g4fqxqy68bgsqzxdpz8n1sw0az1zgk33zc0xa8bwibwd1k2s6pj"; })
2423
(fetchNuGet { pname = "Microsoft.DotNet.PlatformAbstractions"; version = "3.1.6"; sha256 = "0b9myd7gqbpaw9pkd2bx45jhik9mwj0f1ss57sk2cxmag2lkdws5"; })
25-
(fetchNuGet { pname = "Microsoft.Extensions.DependencyModel"; version = "3.1.0"; sha256 = "12nrdw3q9wl5zry8gb3sw003a0iyk2gvps2ij813l7lim38wy1mi"; })
2624
(fetchNuGet { pname = "Microsoft.Extensions.DependencyModel"; version = "8.0.0"; sha256 = "02jnx23hm1vid3yd9pw4gghzn6qkgdl5xfc5r0zrcxdax70rsh5a"; })
27-
(fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "17.13.0"; sha256 = "01p56340mn7awnszni5g23hpr3hhhxhxhkxk2ssnjw3w4nzv1kdi"; })
25+
(fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "17.12.0"; sha256 = "1n066wzabcwzfg2ml4fb3xk2s3wa0m5791yphkdgrh3n31p4988c"; })
2826
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
2927
(fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; })
3028
(fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies"; version = "1.0.3"; sha256 = "0hc4d4d4358g5192mf8faijwk0bpf9pjwcfd3h85sr67j0zhj6hl"; })
3129
(fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net48"; version = "1.0.3"; sha256 = "18h4265rn5dy5d1igddsz1ilygcyyj4id4cn2qsr3sz7722k8zla"; })
32-
(fetchNuGet { pname = "Microsoft.Testing.Extensions.CodeCoverage"; version = "17.13.1"; sha256 = "1d0wjhkmycwwbcsxbgc8jbja6hq3bqjpya97cl71x0wxbgpibglv"; })
33-
(fetchNuGet { pname = "Microsoft.Testing.Extensions.Telemetry"; version = "1.6.3"; sha256 = "1n6iya314hq839jryljsziazlrffsgzq5xgwdlcdy7hn39fi6p0d"; })
34-
(fetchNuGet { pname = "Microsoft.Testing.Extensions.TrxReport"; version = "1.6.3"; sha256 = "1dvjqbjn22hx60cy22y447ifpvmflz1b67h7qpk0js4pavsnczj5"; })
35-
(fetchNuGet { pname = "Microsoft.Testing.Extensions.TrxReport.Abstractions"; version = "1.6.3"; sha256 = "14hlz3811hsnahnlxbm10ixkw4p6b34jj60wxcp8kxinzl4dmzl2"; })
36-
(fetchNuGet { pname = "Microsoft.Testing.Extensions.VSTestBridge"; version = "1.6.3"; sha256 = "0wfi5r2bjpd3ff4h49wb8p8lw7kgjm87i8vpfxq6dxa8fw4djm70"; })
37-
(fetchNuGet { pname = "Microsoft.Testing.Platform"; version = "1.4.3"; sha256 = "03137x2gafb77lfa5csknlxggdmrlh6fk9d1lnflg5s6w3x7g81a"; })
38-
(fetchNuGet { pname = "Microsoft.Testing.Platform"; version = "1.6.3"; sha256 = "1m2pzimldp8nvw0k9357s8lhj90ywrsin18h1lwkbmhv5p6gd42q"; })
39-
(fetchNuGet { pname = "Microsoft.Testing.Platform.MSBuild"; version = "1.6.3"; sha256 = "0fv0h14cnn46zrh3x34rn5l671dzsa7jwyn6hakfwj1fmvh2bbr4"; })
40-
(fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "17.13.0"; sha256 = "0jgrsradkaln0nhzw8xz6dh631paw813fmfjx6hhzg7wz26iybg9"; })
30+
(fetchNuGet { pname = "Microsoft.Testing.Extensions.Telemetry"; version = "1.5.1"; sha256 = "12nigilvmiy632pb84lagksfix5n9s8rjdjsr1y36x2vrn3c2kab"; })
31+
(fetchNuGet { pname = "Microsoft.Testing.Extensions.TrxReport.Abstractions"; version = "1.5.1"; sha256 = "0jwkkfc1c1w9pj2cipjj95s5adiqnz5drnl99xxrjn35wjkshpr3"; })
32+
(fetchNuGet { pname = "Microsoft.Testing.Extensions.VSTestBridge"; version = "1.5.1"; sha256 = "19jnx9lwlsb7p2wbgaisbf6sc2mkcbfasms5cf68srladz01ji4f"; })
33+
(fetchNuGet { pname = "Microsoft.Testing.Platform"; version = "1.5.1"; sha256 = "19v5rzb9fjbh0kg8jsayfj7rz7zb3w9mckm9w5wq40b52aznk695"; })
34+
(fetchNuGet { pname = "Microsoft.Testing.Platform.MSBuild"; version = "1.5.1"; sha256 = "1v89jykrc38rwmafqxz19mh4sgjy59y3f5wrfwbm9g7arbxj9i0x"; })
35+
(fetchNuGet { pname = "Microsoft.TestPlatform.ObjectModel"; version = "17.12.0"; sha256 = "1z6py2r4dyhbv1wwz505mhrfllrna2irimsi4800iil25c2lfw6x"; })
4136
(fetchNuGet { pname = "Microsoft.Win32.Registry"; version = "5.0.0"; sha256 = "102hvhq2gmlcbq8y2cb7hdr2dnmjzfp2k3asr1ycwrfacwyaak7n"; })
42-
(fetchNuGet { pname = "MSTest"; version = "3.8.3"; sha256 = "0hqsydqvas6f9v1mjhb0ql97pcasyf7sphzyzjiyx34hn161bmv3"; })
43-
(fetchNuGet { pname = "MSTest.Analyzers"; version = "3.8.3"; sha256 = "0lrvyz2f0x3grf5vb4kydyazlg87266f1bhjskwbx2fhkh9zmmzw"; })
44-
(fetchNuGet { pname = "MSTest.TestAdapter"; version = "3.8.3"; sha256 = "0s7nl8ii4iy09r0909lprk4ldscyaisbk33bbgsxqwz7bgiy05x4"; })
45-
(fetchNuGet { pname = "MSTest.TestFramework"; version = "3.8.3"; sha256 = "0p2fq6azb71v3mvija6gi39qz3v7362llkg2gcqd6a9nz7m5vn6x"; })
37+
(fetchNuGet { pname = "MSTest"; version = "3.7.1"; sha256 = "0j9w830ymhrcpgsiccvr6cx0kj383bpxic9r5yds0p1k3wlqk0f0"; })
38+
(fetchNuGet { pname = "MSTest.Analyzers"; version = "3.7.1"; sha256 = "08rxpb21yjk34lbsj6nx9vizj1x5isb269mrdxqmy2gvx76bxmc4"; })
39+
(fetchNuGet { pname = "MSTest.TestAdapter"; version = "3.7.1"; sha256 = "1jm9fcmnh04q8ikx5liqi08w9n9bja38qqj6h1p893ijbx01qan0"; })
40+
(fetchNuGet { pname = "MSTest.TestFramework"; version = "3.7.1"; sha256 = "19rxwjgdmv1ajm2b4pp9vqgvl7pma4xad190w6zq203ff2cy24aj"; })
4641
(fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; })
4742
(fetchNuGet { pname = "Newtonsoft.Json"; version = "13.0.3"; sha256 = "0xrwysmrn4midrjal8g2hr1bbg38iyisl0svamb11arqws4w2bw7"; })
4843
(fetchNuGet { pname = "Nullable"; version = "1.3.1"; sha256 = "0hwrr4q22c0i056dqy3v431rxjv7md910ihz0pjsi16qxsbpw7p7"; })

src/BizHawk.Client.Common/config/Binding.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin
6767
Bind("General", "Toggle Display Nothing");
6868
Bind("General", "Accept Background Input");
6969
Bind("General", "Capture Mouse", "WMouse M");
70-
Bind("General", "Toggle Stay on Top");
7170

7271
Bind("Save States", "Save State 1", "Shift+F1");
7372
Bind("Save States", "Save State 2", "Shift+F2");

src/BizHawk.Client.Common/config/Config.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ public void SetWindowScaleFor(string sysID, int windowScale)
169169
public string UpdateIgnoreVersion { get; set; } = "";
170170
public bool SkipOutdatedOsCheck { get; set; }
171171
public bool CaptureMouse { get; set; } = false;
172-
public bool MainFormMouseCaptureForcesTopmost { get; set; } = false;
173172

174173
public bool SkipSuperuserPrivsCheck { get; set; }
175174

src/BizHawk.Client.Common/rewind/ZeldaWinder.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,7 @@ private void MaybeResize(int requestedSize)
290290
_dest = replacement;
291291
}
292292
}
293-
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
294-
public override void Write(ReadOnlySpan<byte> buffer)
295-
#else
296293
public void Write(ReadOnlySpan<byte> buffer)
297-
#endif
298294
{
299295
var requestedSize = _position + buffer.Length;
300296
MaybeResize(requestedSize);
@@ -308,11 +304,7 @@ public override void WriteByte(byte value)
308304
_dest[_position] = value;
309305
_position = requestedSize;
310306
}
311-
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
312-
public override int Read(Span<byte> buffer) => throw new IOException();
313-
#else
314307
public int Read(Span<byte> buffer) => throw new IOException();
315-
#endif
316308
}
317309
}
318310
}

src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -443,22 +443,14 @@ public override void Flush() {}
443443
public override int Read(byte[] buffer, int offset, int count) => throw new IOException();
444444
public override long Seek(long offset, SeekOrigin origin) => throw new IOException();
445445
public override void SetLength(long value) => throw new IOException();
446-
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
447-
public override int Read(Span<byte> buffer) => throw new IOException();
448-
#else
449446
public int Read(Span<byte> buffer) => throw new IOException();
450-
#endif
451447

452448
public override void Write(byte[] buffer, int offset, int count)
453449
{
454450
Write(new ReadOnlySpan<byte>(buffer, offset, count));
455451
}
456452

457-
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
458-
public override void Write(ReadOnlySpan<byte> buffer)
459-
#else
460453
public void Write(ReadOnlySpan<byte> buffer)
461-
#endif
462454
{
463455
long requestedSize = _position + buffer.Length;
464456
while (requestedSize > _notifySize)
@@ -534,11 +526,7 @@ public override int Read(byte[] buffer, int offset, int count)
534526
return Read(new Span<byte>(buffer, offset, count));
535527
}
536528

537-
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
538-
public override int Read(Span<byte> buffer)
539-
#else
540529
public int Read(Span<byte> buffer)
541-
#endif
542530
{
543531
long n = Math.Min(_size - _position, buffer.Length);
544532
int ret = (int)n;
@@ -589,11 +577,7 @@ public override int ReadByte()
589577
public override void SetLength(long value) => throw new IOException();
590578
public override void Write(byte[] buffer, int offset, int count) => throw new IOException();
591579

592-
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
593-
public override void Write(ReadOnlySpan<byte> buffer) => throw new IOException();
594-
#else
595580
public void Write(ReadOnlySpan<byte> buffer) => throw new IOException();
596-
#endif
597581
}
598582
}
599583
}

src/BizHawk.Client.EmuHawk/Extensions/ControlExtensions.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ public static void PopulateFromEnum<T>(this ComboBox box, T enumVal)
3131
box.SelectedItem = enumVal.GetDescription();
3232
}
3333

34+
/// <summary>extension method to make <see cref="Control.Invoke(Delegate)"/> easier to use</summary>
35+
public static void Invoke(this Control control, Action action)
36+
=> control.Invoke(action);
37+
38+
/// <summary>extension method to make <see cref="Control.BeginInvoke(Delegate)"/> easier to use</summary>
39+
public static void BeginInvoke(this Control control, Action action)
40+
=> control.BeginInvoke(action);
41+
3442
public static ToolStripMenuItem ToColumnsMenu(this InputRoll inputRoll, Action changeCallback)
3543
{
3644
var menu = new ToolStripMenuItem

src/BizHawk.Client.EmuHawk/MainForm.Events.cs

Lines changed: 51 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -115,30 +115,31 @@ private void LoadStateSubMenu_DropDownOpened(object sender, EventArgs e)
115115

116116
private void SaveSlotSubMenu_DropDownOpened(object sender, EventArgs e)
117117
{
118-
var slotMenuItems = new ToolStripMenuItem/*?*/[]
119-
{
120-
null,
121-
SelectSlot1MenuItem,
122-
SelectSlot2MenuItem,
123-
SelectSlot3MenuItem,
124-
SelectSlot4MenuItem,
125-
SelectSlot5MenuItem,
126-
SelectSlot6MenuItem,
127-
SelectSlot7MenuItem,
128-
SelectSlot8MenuItem,
129-
SelectSlot9MenuItem,
130-
SelectSlot0MenuItem,
131-
};
132-
for (var i = 1; i < slotMenuItems.Length; i++)
133-
{
134-
slotMenuItems[i]!.ShortcutKeyDisplayString = Config.HotkeyBindings[$"Select State {i}"];
135-
}
118+
SelectSlot1MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 1"];
119+
SelectSlot2MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 2"];
120+
SelectSlot3MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 3"];
121+
SelectSlot4MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 4"];
122+
SelectSlot5MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 5"];
123+
SelectSlot6MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 6"];
124+
SelectSlot7MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 7"];
125+
SelectSlot8MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 8"];
126+
SelectSlot9MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 9"];
127+
SelectSlot0MenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Select State 10"];
136128
PreviousSlotMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Previous Slot"];
137129
NextSlotMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Next Slot"];
138130
SaveToCurrentSlotMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Quick Save"];
139131
LoadCurrentSlotMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Quick Load"];
140-
var slot = Config.SaveSlot;
141-
for (var i = 1; i < slotMenuItems.Length; i++) slotMenuItems[i]!.Checked = slot == i;
132+
133+
SelectSlot1MenuItem.Checked = Config.SaveSlot == 1;
134+
SelectSlot2MenuItem.Checked = Config.SaveSlot == 2;
135+
SelectSlot3MenuItem.Checked = Config.SaveSlot == 3;
136+
SelectSlot4MenuItem.Checked = Config.SaveSlot == 4;
137+
SelectSlot5MenuItem.Checked = Config.SaveSlot == 5;
138+
SelectSlot6MenuItem.Checked = Config.SaveSlot == 6;
139+
SelectSlot7MenuItem.Checked = Config.SaveSlot == 7;
140+
SelectSlot8MenuItem.Checked = Config.SaveSlot == 8;
141+
SelectSlot9MenuItem.Checked = Config.SaveSlot == 9;
142+
SelectSlot0MenuItem.Checked = Config.SaveSlot is 10;
142143
}
143144

144145
private void SaveRamSubMenu_DropDownOpened(object sender, EventArgs e)
@@ -287,7 +288,17 @@ private void AutosaveLastSlotMenuItem_Click(object sender, EventArgs e)
287288

288289
private void SelectSlotMenuItems_Click(object sender, EventArgs e)
289290
{
290-
Config.SaveSlot = (int) ((ToolStripItem) sender).Tag;
291+
if (sender == SelectSlot1MenuItem) Config.SaveSlot = 1;
292+
else if (sender == SelectSlot2MenuItem) Config.SaveSlot = 2;
293+
else if (sender == SelectSlot3MenuItem) Config.SaveSlot = 3;
294+
else if (sender == SelectSlot4MenuItem) Config.SaveSlot = 4;
295+
else if (sender == SelectSlot5MenuItem) Config.SaveSlot = 5;
296+
else if (sender == SelectSlot6MenuItem) Config.SaveSlot = 6;
297+
else if (sender == SelectSlot7MenuItem) Config.SaveSlot = 7;
298+
else if (sender == SelectSlot8MenuItem) Config.SaveSlot = 8;
299+
else if (sender == SelectSlot9MenuItem) Config.SaveSlot = 9;
300+
else if (sender == SelectSlot0MenuItem) Config.SaveSlot = 10;
301+
291302
UpdateStatusSlots();
292303
SaveSlotSelectedMessage();
293304
}
@@ -1265,18 +1276,19 @@ private void MainFormContextMenu_Opening(object sender, System.ComponentModel.Ca
12651276
}
12661277
}
12671278

1268-
var quicksaveSlot = Config.SaveSlot;
1269-
if (File.Exists($"{SaveStatePrefix()}.QuickSave{quicksaveSlot % 10}.State.bak"))
1279+
var file = new FileInfo($"{SaveStatePrefix()}.QuickSave{Config.SaveSlot % 10}.State.bak");
1280+
1281+
if (file.Exists)
12701282
{
12711283
UndoSavestateContextMenuItem.Enabled = true;
1272-
if (_stateSlots.IsRedo(MovieSession.Movie, quicksaveSlot))
1284+
if (_stateSlots.IsRedo(MovieSession.Movie, Config.SaveSlot))
12731285
{
1274-
UndoSavestateContextMenuItem.Text = $"Redo Save to slot {quicksaveSlot}";
1286+
UndoSavestateContextMenuItem.Text = $"Redo Save to slot {Config.SaveSlot}";
12751287
UndoSavestateContextMenuItem.Image = Properties.Resources.Redo;
12761288
}
12771289
else
12781290
{
1279-
UndoSavestateContextMenuItem.Text = $"Undo Save to slot {quicksaveSlot}";
1291+
UndoSavestateContextMenuItem.Text = $"Undo Save to slot {Config.SaveSlot}";
12801292
UndoSavestateContextMenuItem.Image = Properties.Resources.Undo;
12811293
}
12821294
}
@@ -1373,9 +1385,8 @@ private void ViewCommentsContextMenuItem_Click(object sender, EventArgs e)
13731385

13741386
private void UndoSavestateContextMenuItem_Click(object sender, EventArgs e)
13751387
{
1376-
var slot = Config.SaveSlot;
1377-
_stateSlots.SwapBackupSavestate(MovieSession.Movie, $"{SaveStatePrefix()}.QuickSave{slot % 10}.State", slot);
1378-
AddOnScreenMessage($"Save slot {slot} restored.");
1388+
_stateSlots.SwapBackupSavestate(MovieSession.Movie, $"{SaveStatePrefix()}.QuickSave{Config.SaveSlot % 10}.State", Config.SaveSlot);
1389+
AddOnScreenMessage($"Save slot {Config.SaveSlot} restored.");
13791390
}
13801391

13811392
private void ClearSramContextMenuItem_Click(object sender, EventArgs e)
@@ -1408,7 +1419,17 @@ private void DumpStatusButton_Click(object sender, EventArgs e)
14081419

14091420
private void SlotStatusButtons_MouseEnter(object/*?*/ sender, EventArgs e)
14101421
{
1411-
var slot = (int) ((ToolStripItem) sender).Tag;
1422+
var slot = 10;
1423+
if (sender == Slot1StatusButton) slot = 1;
1424+
else if (sender == Slot2StatusButton) slot = 2;
1425+
else if (sender == Slot3StatusButton) slot = 3;
1426+
else if (sender == Slot4StatusButton) slot = 4;
1427+
else if (sender == Slot5StatusButton) slot = 5;
1428+
else if (sender == Slot6StatusButton) slot = 6;
1429+
else if (sender == Slot7StatusButton) slot = 7;
1430+
else if (sender == Slot8StatusButton) slot = 8;
1431+
else if (sender == Slot9StatusButton) slot = 9;
1432+
//TODO just put the slot number in Control.Tag already
14121433
if (!(HasSlot(slot) && ReadScreenshotFromSavestate(slot: slot) is {} bb))
14131434
{
14141435
_screenshotTooltip.FadeOut();

src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ void SelectAndLoadFromSlot(int slot)
152152
case "Capture Mouse":
153153
ToggleCaptureMouse();
154154
break;
155-
case "Toggle Stay on Top":
156-
ToggleStayOnTop();
157-
break;
158155

159156
// Save States
160157
case "Save State 1":

0 commit comments

Comments
 (0)