From 05a525d2c40cb4e77057b33d726e444046b11392 Mon Sep 17 00:00:00 2001 From: goyuken Date: Sat, 11 May 2013 23:46:23 +0000 Subject: [PATCH] dual gameboy: on_snoop support. you get a callback per sub-core, as would be expected. --- .../Consoles/Nintendo/Gameboy/GambatteLink.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/GambatteLink.cs b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/GambatteLink.cs index 2f485a446c..37fb9c28d5 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -50,6 +50,9 @@ namespace BizHawk.Emulation.Consoles.GB blip_right.SetRates(2097152 * 2, 44100); SetMemoryDomains(); + + L.CoreComm.InputCallback = CallbackLinker; + R.CoreComm.InputCallback = CallbackLinker; } public IVideoProvider VideoProvider { get { return this; } } @@ -71,6 +74,15 @@ namespace BizHawk.Emulation.Consoles.GB public ControllerDefinition ControllerDefinition { get { return DualGbController; } } public IController Controller { get; set; } + /// + /// each sub-core calls this + /// + void CallbackLinker() + { + if (CoreComm.InputCallback != null) + CoreComm.InputCallback(); + } + public void FrameAdvance(bool render, bool rendersound = true) { LCont.Clear();