NES - PPU Viewer - draw immediately on load, PPU Viewer / Nametable Viewer - draw immediately on Restart()

This commit is contained in:
adelikat 2012-08-12 02:21:53 +00:00
parent 57987c0a21
commit 6dfcd10575
2 changed files with 5 additions and 2 deletions

View File

@ -124,6 +124,7 @@ namespace BizHawk.MultiClient
{
if (!(Global.Emulator is NES)) this.Close();
Nes = Global.Emulator as NES;
Generate(true);
}
private void NESNameTableViewer_Load(object sender, EventArgs e)

View File

@ -63,6 +63,7 @@ namespace BizHawk.MultiClient
if (!(Global.Emulator is NES)) this.Close();
if (!this.IsHandleCreated || this.IsDisposed) return;
Nes = Global.Emulator as NES;
Generate(true);
}
private void LoadConfigSettings()
@ -79,11 +80,11 @@ namespace BizHawk.MultiClient
return (byte)(((PPUBus[address] >> (7 - bit)) & 1));
}
unsafe void Generate()
unsafe void Generate(bool now = false)
{
if (!this.IsHandleCreated || this.IsDisposed) return;
if (Global.Emulator.Frame % RefreshRate.Value == 0)
if (Global.Emulator.Frame % RefreshRate.Value == 0 || now)
{
bool Changed = false;
for (int x = 0; x < 0x2000; x++)
@ -236,6 +237,7 @@ namespace BizHawk.MultiClient
Nes = Global.Emulator as NES;
ClearDetails();
RefreshRate.Value = Global.Config.NESPPURefreshRate;
Generate(true);
}
private void ClearDetails()