Skip to content

Commit

Permalink
Autoformat fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TiKevin83 committed Sep 1, 2023
1 parent 6564004 commit 6cc4c35
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/BizHawk.Client.EmuHawk/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ IGL CheckRenderer(IGL gl)
newSound => globalSound = newSound,
args,
out var movieSession,
out object exitEarly);
out bool exitEarly);
if (exitEarly)
{
//TODO also use this for ArgParser failure
Expand Down
2 changes: 1 addition & 1 deletion src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.ISettable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void GetROMsInfo()
string hashdata = substrings[1];
long flags = long.Parse(substrings[2]);

if (flags & LibMAME.ROMENTRY_TYPEMASK is LibMAME.ROMENTRYTYPE_SYSTEM_BIOS
if ((flags & LibMAME.ROMENTRY_TYPEMASK) is LibMAME.ROMENTRYTYPE_SYSTEM_BIOS
or LibMAME.ROMENTRYTYPE_DEFAULT_BIOS)
{
setting.Options.Add(name, hashdata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ public int BufferHeight

public int VsyncNumerator { get; private set; }

public int VsyncDenominator => _vsyncDen;
public int VsyncDenominator { get; private set; }

public int BackgroundColor => _core.Settings.BackgroundColor.ToArgb();

private readonly int[] _frameBuffer = new int[ScreenWidth * MaxScreenHeight];
private int _vsyncDen;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void Tick()
ch_out[i] = poly5.Bit(16);
}
}
else if (Regs[i * 2 + 1] & 0xF0 is 0x20 or 0x60)
else if ((Regs[i * 2 + 1] & 0xF0) is 0x20 or 0x60)
{
// 5 bit poly
//if (ch_src[i])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ private static (byte[] Disk, byte[] Error) TransformDisk(byte[] disk)
defectAmount--;
}

int blockCalc = (lba & 3 is 0 or 3) ? 0 : 1;
int blockCalc = ((lba & 3) is 0 or 3) ? 0 : 1;

int offsetCalc = _startOffsetTable[pzoneCalc];
offsetCalc += (trackCalc - trackStart) * _blockSizeTable[headCalc ? pzoneCalc - 7 : pzoneCalc] * 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public override void WriteReg(int addr, byte value)

if (LCDC.Bit(7))
{
if (STAT & 3 is 0 or 1)
if ((STAT & 3) is 0 or 1)
{
LYC_INT = true;
//if (Core.REG_FFFF.Bit(1)) { Core.cpu.FlagI = true; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ void ICodeDataLogger.NewCDL(ICodeDataLog cdl)
}

[FeatureNotImplemented]
public void DisassembleCDL(Stream s, ICodeDataLog cdl) => throw new NotImplementedException();// this doesn't actually do anything/*
for (int i = 0; i < _numCores; i++)
{
_linkedCores[i].DisassembleCDL(s, cdl);
}
*/
public void DisassembleCDL(Stream s, ICodeDataLog cdl) => throw new NotImplementedException();// this doesn't actually do anything
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void WriteReg(int addr, byte value)
{
prg[3] = (byte)(addr & 0x3F);
}
else if (addr & 0xF80C is >= 0xB000 and <= 0xE00C)
else if ((addr & 0xF80C) is >= 0xB000 and <= 0xE00C)
{
int index = (((addr >> 11) - 6) | (addr >> 3)) & 7;
chr[index] = (byte)((chr[index] & (0xF0 >> (addr & 4))) | ((value & 0x0F) << (addr & 4)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public partial class LibsnesCore : IVideoProvider

public int BufferWidth { get; private set; } = 256;

public int BufferHeight => _videoHeight;

public int BufferHeight { get; private set; } = 224;
public int BackgroundColor => 0;

public int[] GetVideoBuffer() => _videoBuffer;
Expand All @@ -20,6 +19,5 @@ public partial class LibsnesCore : IVideoProvider
public int VsyncDenominator { get; }

private int[] _videoBuffer = new int[256 * 224];
private int _videoHeight = 224;
}
}
11 changes: 3 additions & 8 deletions src/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,9 @@ public PCEngine(CoreLoadParameters<PCESettings, PCESyncSettings> lp)
{
Type = (SystemId = lp.Game.System) switch
{
default:
case VSystemID.Raw.PCE:
Type = NecSystemType.TurboGrafx;
break;
case VSystemID.Raw.SGX:
Type = NecSystemType.SuperGrafx;
break;
}
VSystemID.Raw.PCE => NecSystemType.TurboGrafx,
_ => NecSystemType.SuperGrafx,
};

Settings = lp.Settings ?? new PCESettings();
_syncSettings = lp.SyncSettings ?? new PCESyncSettings();
Expand Down

0 comments on commit 6cc4c35

Please sign in to comment.