some nitpick cleanups

This commit is contained in:
adelikat 2020-04-12 12:38:02 -05:00
parent acf959fd4b
commit 6e40c46aa1
2 changed files with 13 additions and 13 deletions

View File

@ -540,7 +540,7 @@ namespace BizHawk.Client.EmuHawk
#endregion #endregion
unsafe void DrawEverything() private unsafe void DrawEverything()
{ {
ushort dispcnt = ((ushort*)_mmio)[0]; ushort dispcnt = ((ushort*)_mmio)[0];
@ -654,7 +654,7 @@ namespace BizHawk.Client.EmuHawk
return mdv; return mdv;
} }
void GenerateWidgets() private void GenerateWidgets()
{ {
listBoxWidgets.BeginUpdate(); listBoxWidgets.BeginUpdate();
_bg0 = MakeMBVWidget("Background 0", 256, 256); _bg0 = MakeMBVWidget("Background 0", 256, 256);
@ -688,7 +688,7 @@ namespace BizHawk.Client.EmuHawk
} }
} }
static void BringToFrontHack(Control c, Control top) private static void BringToFrontHack(Control c, Control top)
{ {
c.Click += (o, e) => top.BringToFront(); c.Click += (o, e) => top.BringToFront();
if (c.HasChildren) if (c.HasChildren)
@ -742,7 +742,7 @@ namespace BizHawk.Client.EmuHawk
// Do nothing // Do nothing
} }
void ShowSelectedWidget() private void ShowSelectedWidget()
{ {
if (listBoxWidgets.SelectedItem != null) if (listBoxWidgets.SelectedItem != null)
{ {

View File

@ -54,12 +54,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
ServiceProvider = ser; ServiceProvider = ser;
PutSettings(_settings); PutSettings(_settings);
_tracer = new TraceBuffer Tracer = new TraceBuffer
{ {
Header = "ARM7: PC, machine code, mnemonic, operands, registers" Header = "ARM7: PC, machine code, mnemonic, operands, registers"
}; };
_tracecb = new LibmGBA.TraceCallback((msg) => _tracer.Put(_traceInfo(msg))); _tracecb = msg => Tracer.Put(_traceInfo(msg));
ser.Register(_tracer); ser.Register(Tracer);
MemoryCallbacks = new MGBAMemoryCallbackSystem(this); MemoryCallbacks = new MGBAMemoryCallbackSystem(this);
} }
catch catch
@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
public ControllerDefinition ControllerDefinition => GBA.GBAController; public ControllerDefinition ControllerDefinition => GBA.GBAController;
private ITraceable _tracer { get; set; } private ITraceable Tracer { get; }
private LibmGBA.TraceCallback _tracecb { get; set; } private LibmGBA.TraceCallback _tracecb { get; set; }
@ -102,7 +102,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
}; };
} }
public bool FrameAdvance(IController controller, bool render, bool rendersound = true) public bool FrameAdvance(IController controller, bool render, bool renderSound = true)
{ {
Frame++; Frame++;
if (controller.IsPressed("Power")) if (controller.IsPressed("Power"))
@ -113,14 +113,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
WireMemoryDomainPointers(); WireMemoryDomainPointers();
} }
LibmGBA.BizSetTraceCallback(_tracer.Enabled ? _tracecb : null); LibmGBA.BizSetTraceCallback(Tracer.Enabled ? _tracecb : null);
IsLagFrame = LibmGBA.BizAdvance( IsLagFrame = LibmGBA.BizAdvance(
Core, Core,
VBANext.GetButtons(controller), VBANext.GetButtons(controller),
render ? _videobuff : _dummyvideobuff, render ? _videobuff : _dummyvideobuff,
ref _nsamp, ref _nsamp,
rendersound ? _soundbuff : _dummysoundbuff, renderSound ? _soundbuff : _dummysoundbuff,
RTCTime(), RTCTime(),
(short)controller.AxisValue("Tilt X"), (short)controller.AxisValue("Tilt X"),
(short)controller.AxisValue("Tilt Y"), (short)controller.AxisValue("Tilt Y"),
@ -245,9 +245,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
return (long)DateTime.Now.Subtract(new DateTime(1970, 1, 1)).TotalSeconds; return (long)DateTime.Now.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
} }
long basetime = (long)_syncSettings.RTCInitialTime.Subtract(new DateTime(1970, 1, 1)).TotalSeconds; long baseTime = (long)_syncSettings.RTCInitialTime.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
long increment = Frame * 4389L >> 18; long increment = Frame * 4389L >> 18;
return basetime + increment; return baseTime + increment;
} }
} }
} }