From e50272f9f4811bd8d6e39072fda5f09b254f49e6 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Sun, 20 Jan 2019 10:12:06 -0600 Subject: [PATCH] GBHawkLink: Fix frame display when loading a state --- .../Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs index df9029b226..5187308752 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.IEmulator.cs @@ -148,11 +148,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink { buff_L = L.GetVideoBuffer(); L.vblank_rise = false; + FillVideoBuffer(); } if (R.vblank_rise) { buff_R = R.GetVideoBuffer(); R.vblank_rise = false; + FillVideoBuffer(); } } } @@ -194,6 +196,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink public int[] buff_R = new int[160 * 144]; public int[] GetVideoBuffer() + { + return _vidbuffer; + } + + public void FillVideoBuffer() { // combine the 2 video buffers from the instances for (int i = 0; i < 144; i++) @@ -202,10 +209,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink { _vidbuffer[i * 320 + j] = buff_L[i * 160 + j]; _vidbuffer[i * 320 + j + 160] = buff_R[i * 160 + j]; - } + } } - - return _vidbuffer; } public int VirtualWidth => 160 * 2;