Code style fixes

This commit is contained in:
YoshiRulz 2025-03-28 05:41:04 +10:00
parent 88d2a58e44
commit e68aa2e4c3
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
12 changed files with 33 additions and 43 deletions

View File

@ -248,6 +248,10 @@ namespace BizHawk.Client.Common
}
switch (discType)
{
case DiscType.DOS:
game.System = VSystemID.Raw.DOS;
break;
case DiscType.SegaSaturn:
game.System = VSystemID.Raw.SAT;
break;
@ -297,9 +301,6 @@ namespace BizHawk.Client.Common
case DiscType.Wii:
NoCoreForSystem(VSystemID.Raw.Wii);
break;
case DiscType.DOS:
game.System = VSystemID.Raw.DOS;
break;
case DiscType.AudioDisc:
case DiscType.UnknownCDFS:

View File

@ -28,6 +28,7 @@ using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores;
using BizHawk.Emulation.Cores.Computers.AppleII;
using BizHawk.Emulation.Cores.Computers.Commodore64;
using BizHawk.Emulation.Cores.Computers.DOS;
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
using BizHawk.Emulation.Cores.Consoles.SNK;
using BizHawk.Emulation.Cores.Nintendo.GBA;
@ -41,7 +42,6 @@ using BizHawk.Client.EmuHawk.CoreExtensions;
using BizHawk.Client.EmuHawk.CustomControls;
using BizHawk.Common.CollectionExtensions;
using BizHawk.WinForms.Controls;
using BizHawk.Emulation.Cores.Computers.DOS;
namespace BizHawk.Client.EmuHawk
{
@ -1996,7 +1996,7 @@ namespace BizHawk.Client.EmuHawk
byte[] sram;
// some cores might not know how big the saveram ought to be, so just send it the whole file
if (Emulator is AppleII or C64 or MGBAHawk or NeoGeoPort or NES { BoardName: "FDS" } or DOSBox)
if (Emulator is AppleII or C64 or DOSBox or MGBAHawk or NeoGeoPort or NES { BoardName: "FDS" })
{
sram = File.ReadAllBytes(saveRamPath);
}

View File

@ -463,14 +463,7 @@ namespace BizHawk.Emulation.Common
game.System = VSystemID.Raw.Amiga;
break;
case ".IMA":
case ".IMG":
case ".XDF":
case ".DMF":
case ".FDD":
//case ".FDI":
case ".NFD":
case ".D88":
case ".D88" or ".DMF" or ".FDD" /*or ".FDI"*/ or ".IMA" or ".IMG" or ".NFD" or ".XDF":
game.System = VSystemID.Raw.DOS;
break;

View File

@ -25,8 +25,8 @@
<Compile Update="Computers/Amiga/UAE.*.cs" DependentUpon="UAE.cs" />
<Compile Update="Computers/AppleII/AppleII.*.cs" DependentUpon="AppleII.cs" />
<Compile Update="Computers/Commodore64/C64.*.cs" DependentUpon="C64.cs" />
<Compile Update="Computers/DOS/DOSBox.*.cs" DependentUpon="DOSBox.cs" />
<Compile Update="Computers/Doom/DSDA.*.cs" DependentUpon="DSDA.cs" />
<Compile Update="Computers/DOS/DOSBox.*.cs" DependentUpon="DOSBox.cs" />
<Compile Update="Computers/SinclairSpectrum/Hardware/Disk/NECUPD765.*.cs" DependentUpon="NECUPD765.cs" />
<Compile Update="Computers/SinclairSpectrum/Hardware/Disk/NECUPS765.Static.cs" DependentUpon="NECUPD765.cs" />
<Compile Update="Computers/SinclairSpectrum/Machine/Pentagon128K/Pentagon128.*.cs" DependentUpon="Pentagon128.cs" />

View File

@ -60,8 +60,8 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
controller.BoolButtons.Add(Inputs.Mouse + " " + MouseInputs.LeftButton);
controller.BoolButtons.Add(Inputs.Mouse + " " + MouseInputs.MiddleButton);
controller.BoolButtons.Add(Inputs.Mouse + " " + MouseInputs.RightButton);
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosX, (0).RangeTo(LibDOSBox.SVGA_MAX_WIDTH), LibDOSBox.SVGA_MAX_WIDTH / 2);
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosY, (0).RangeTo(LibDOSBox.SVGA_MAX_HEIGHT), LibDOSBox.SVGA_MAX_HEIGHT / 2);
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosX, 0.RangeTo(LibDOSBox.SVGA_MAX_WIDTH), LibDOSBox.SVGA_MAX_WIDTH / 2);
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.PosY, 0.RangeTo(LibDOSBox.SVGA_MAX_HEIGHT), LibDOSBox.SVGA_MAX_HEIGHT / 2);
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.SpeedX, (-LibDOSBox.SVGA_MAX_WIDTH / 2).RangeTo(LibDOSBox.SVGA_MAX_WIDTH / 2), 0);
controller.AddAxis(Inputs.Mouse + " " + MouseInputs.SpeedY, (-LibDOSBox.SVGA_MAX_HEIGHT / 2).RangeTo(LibDOSBox.SVGA_MAX_HEIGHT / 2), 0);
}

View File

@ -287,7 +287,7 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
=> SettingsUtil.SetDefaultValues(this);
public SyncSettings Clone()
=> (SyncSettings)MemberwiseClone();
=> (SyncSettings) MemberwiseClone();
public static bool NeedsReboot(SyncSettings x, SyncSettings y)
=> !DeepEquality.DeepEquals(x, y);

View File

@ -426,7 +426,7 @@ namespace BizHawk.Emulation.Cores.Computers.DOS
{
unsafe
{
fi.Keys.Buffer[(int)key] = 1;
fi.Keys.Buffer[(int) key] = 1;
}
}
}

View File

@ -190,11 +190,8 @@ namespace BizHawk.Emulation.DiscSystem
if (DetectWii())
return DiscType.Wii;
if (DetectISO9660())
return DiscType.DOS;
if (DetectUDF())
return DiscType.DOS;
if (DetectISO9660()) return DiscType.DOS;
if (DetectUDF()) return DiscType.DOS;
var discView = EDiscStreamView.DiscStreamView_Mode1_2048;
if (_disc.TOC.SessionFormat == SessionFormat.Type20_CDXA)
@ -405,7 +402,7 @@ namespace BizHawk.Emulation.DiscSystem
return hexString == "5D1C9EA3";
}
// Detects ISO9660 / Joliet CD formats (target for DOS / Windows)
/// <summary>Detects ISO9660 / Joliet CD formats (target for DOS / Windows)</summary>
/// <remarks><see href="https://en.wikipedia.org/wiki/ISO_9660"/></remarks>
private bool DetectISO9660()
{
@ -414,7 +411,6 @@ namespace BizHawk.Emulation.DiscSystem
return false;
}
// Detects UDF
/// <remarks><see href="https://www.cnwrecovery.com/manual/HowToRecogniseTypeOfCDDVD.html"/></remarks>
private bool DetectUDF()
{