Replace Debug.WriteLine w/ Util.DebugWriteLine
(or `Console.WriteLine` if it's in `#if DEBUG`) bonus wtf: 2 calls in Database were to `WriteLine(string, string)` overload, not the intended `WriteLine(string, params object[])` overload
This commit is contained in:
parent
99260d2746
commit
517be084ab
|
@ -174,13 +174,13 @@ namespace BizHawk.Bizware.OpenTK3
|
|||
[Conditional("DEBUG")]
|
||||
private void DebugState(GamePadState tmpState)
|
||||
{
|
||||
if (!tmpState.Equals(state)) Debug.WriteLine($"GamePad State:\t{tmpState}");
|
||||
if (!tmpState.Equals(state)) Console.WriteLine($"GamePad State:\t{tmpState}");
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
private void DebugState(JoystickState tmpJstate)
|
||||
{
|
||||
if (!tmpJstate.Equals(jState)) Debug.WriteLine($"Joystick State:\t{tmpJstate}");
|
||||
if (!tmpJstate.Equals(jState)) Console.WriteLine($"Joystick State:\t{tmpJstate}");
|
||||
}
|
||||
|
||||
public IEnumerable<(string AxisID, float Value)> GetAxes()
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
|
@ -422,7 +421,7 @@ namespace BizHawk.Client.Common
|
|||
rom.GameInfo.System = "NES";
|
||||
}
|
||||
|
||||
Debug.WriteLine(rom.GameInfo.System);
|
||||
Util.DebugWriteLine(rom.GameInfo.System);
|
||||
|
||||
if (string.IsNullOrEmpty(rom.GameInfo.System))
|
||||
{
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
#if DEBUG
|
||||
if (e is ReflectionTypeLoadException rtle)
|
||||
{
|
||||
foreach (var e1 in rtle.LoaderExceptions) System.Diagnostics.Debug.WriteLine(e1.Message);
|
||||
foreach (var e1 in rtle.LoaderExceptions) Console.WriteLine(e1.Message);
|
||||
}
|
||||
#endif
|
||||
item.ToolTipText = e switch
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
|
@ -169,7 +168,7 @@ namespace BizHawk.Common
|
|||
_extractor.ExtractFile(archiveIndex, _boundStream);
|
||||
_boundStream.Position = 0;
|
||||
ArchiveMemberPath = _archiveItems[index].Name; // TODO - maybe go through our own list of names? maybe not, its indices don't match...
|
||||
Debug.WriteLine($"{nameof(HawkFile)} bound {CanonicalFullPath}");
|
||||
Util.DebugWriteLine($"{nameof(HawkFile)} bound {CanonicalFullPath}");
|
||||
BoundIndex = archiveIndex;
|
||||
return this;
|
||||
}
|
||||
|
@ -240,7 +239,7 @@ namespace BizHawk.Common
|
|||
private void BindRoot()
|
||||
{
|
||||
_boundStream = _rootStream;
|
||||
Debug.WriteLine($"{nameof(HawkFile)} bound {CanonicalFullPath}");
|
||||
Util.DebugWriteLine($"{nameof(HawkFile)} bound {CanonicalFullPath}");
|
||||
}
|
||||
|
||||
/// <summary>As <see cref="BindFirstOf(string[])"/>, but doesn't bind anything if there are multiple archive members with a matching file extension.</summary>
|
||||
|
|
|
@ -49,12 +49,12 @@ namespace BizHawk.Emulation.Common
|
|||
var filename = Path.Combine(path, line);
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
Debug.WriteLine("loading external game database {0}", line);
|
||||
Util.DebugWriteLine($"loading external game database {line}");
|
||||
initializeWork(filename, warnForCollisions);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.WriteLine("BENIGN: missing external game database {0}", line);
|
||||
Util.DebugWriteLine($"BENIGN: missing external game database {line}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ namespace BizHawk.Emulation.Common
|
|||
}
|
||||
catch
|
||||
{
|
||||
Debug.WriteLine($"Error parsing database entry: {line}");
|
||||
Util.DebugWriteLine($"Error parsing database entry: {line}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
|
||||
{
|
||||
public sealed partial class Vic
|
||||
|
@ -45,11 +46,11 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.MOS
|
|||
|
||||
public Vic(int newCycles, int newLines, IList<int[]> newPipeline, int newCyclesPerSec, int hblankStart, int hblankEnd, int vblankStart, int vblankEnd, C64.BorderType borderType, int pixelRatioNum, int pixelRatioDen)
|
||||
{
|
||||
Debug.WriteLine("C64 VIC timings:");
|
||||
Debug.WriteLine("RX FTCH BA ACT");
|
||||
Util.DebugWriteLine("C64 VIC timings:");
|
||||
Util.DebugWriteLine("RX FTCH BA ACT");
|
||||
for (var i = 0; i < newPipeline[0].Length; i++)
|
||||
{
|
||||
Debug.WriteLine("{0:x4} {1:x4} {2:x4} {3:x8}", newPipeline[0][i], newPipeline[1][i], newPipeline[2][i], newPipeline[3][i]);
|
||||
Util.DebugWriteLine("{0:x4} {1:x4} {2:x4} {3:x8}", newPipeline[0][i], newPipeline[1][i], newPipeline[2][i], newPipeline[3][i]);
|
||||
}
|
||||
|
||||
_pixelRatioNum = pixelRatioNum;
|
||||
|
|
Loading…
Reference in New Issue