internal void FrameAdvancePrep() { Frame++; // update our local copy of the controller data CurrentButtons = 0; if (Controller["Up"]) { CurrentButtons |= LibGambatte.Buttons.UP; } if (Controller["Down"]) { CurrentButtons |= LibGambatte.Buttons.DOWN; } if (Controller["Left"]) { CurrentButtons |= LibGambatte.Buttons.LEFT; } if (Controller["Right"]) { CurrentButtons |= LibGambatte.Buttons.RIGHT; } if (Controller["A"]) { CurrentButtons |= LibGambatte.Buttons.A; } if (Controller["B"]) { CurrentButtons |= LibGambatte.Buttons.B; } if (Controller["Select"]) { CurrentButtons |= LibGambatte.Buttons.SELECT; } if (Controller["Start"]) { CurrentButtons |= LibGambatte.Buttons.START; } // the controller callback will set this to false if it actually gets called during the frame IsLagFrame = true; if (Controller["Power"]) { LibGambatte.gambatte_reset(GambatteState, GetCurrentTime()); } if (Tracer.Enabled) { tracecb = MakeTrace; } else { tracecb = null; } LibGambatte.gambatte_settracecallback(GambatteState, tracecb); LibGambatte.gambatte_setlayers(GambatteState, (_settings.DisplayBG ? 1 : 0) | (_settings.DisplayOBJ ? 2 : 0) | (_settings.DisplayWindow ? 4 : 0)); }
internal void FrameAdvancePrep() { Frame++; // update our local copy of the controller data CurrentButtons = 0; if (Controller["Up"]) CurrentButtons |= LibGambatte.Buttons.UP; if (Controller["Down"]) CurrentButtons |= LibGambatte.Buttons.DOWN; if (Controller["Left"]) CurrentButtons |= LibGambatte.Buttons.LEFT; if (Controller["Right"]) CurrentButtons |= LibGambatte.Buttons.RIGHT; if (Controller["A"]) CurrentButtons |= LibGambatte.Buttons.A; if (Controller["B"]) CurrentButtons |= LibGambatte.Buttons.B; if (Controller["Select"]) CurrentButtons |= LibGambatte.Buttons.SELECT; if (Controller["Start"]) CurrentButtons |= LibGambatte.Buttons.START; // the controller callback will set this to false if it actually gets called during the frame IsLagFrame = true; if (Controller["Power"]) LibGambatte.gambatte_reset(GambatteState, GetCurrentTime()); RefreshMemoryCallbacks(); if (CoreComm.Tracer.Enabled) tracecb = MakeTrace; else tracecb = null; LibGambatte.gambatte_settracecallback(GambatteState, tracecb); }