mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
Merge remote-tracking branch 'upstream/master' into RDLines
This commit is contained in:
commit
a338ef1c8a
@ -146,6 +146,12 @@ GPU3D::GPU3D(melonDS::NDS& nds, std::unique_ptr<Renderer3D>&& renderer) noexcept
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GPU3D::SetCurrentRenderer(std::unique_ptr<Renderer3D>&& renderer) noexcept
|
||||||
|
{
|
||||||
|
CurrentRenderer = std::move(renderer);
|
||||||
|
CurrentRenderer->Reset(NDS.GPU);
|
||||||
|
}
|
||||||
|
|
||||||
void GPU3D::ResetRenderingState() noexcept
|
void GPU3D::ResetRenderingState() noexcept
|
||||||
{
|
{
|
||||||
RenderNumPolygons = 0;
|
RenderNumPolygons = 0;
|
||||||
@ -284,6 +290,9 @@ void GPU3D::Reset() noexcept
|
|||||||
FlushAttributes = 0;
|
FlushAttributes = 0;
|
||||||
|
|
||||||
RenderXPos = 0;
|
RenderXPos = 0;
|
||||||
|
|
||||||
|
if (CurrentRenderer)
|
||||||
|
CurrentRenderer->Reset(NDS.GPU);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU3D::DoSavestate(Savestate* file) noexcept
|
void GPU3D::DoSavestate(Savestate* file) noexcept
|
||||||
|
@ -119,7 +119,7 @@ public:
|
|||||||
[[nodiscard]] bool IsRendererAccelerated() const noexcept;
|
[[nodiscard]] bool IsRendererAccelerated() const noexcept;
|
||||||
[[nodiscard]] Renderer3D& GetCurrentRenderer() noexcept { return *CurrentRenderer; }
|
[[nodiscard]] Renderer3D& GetCurrentRenderer() noexcept { return *CurrentRenderer; }
|
||||||
[[nodiscard]] const Renderer3D& GetCurrentRenderer() const noexcept { return *CurrentRenderer; }
|
[[nodiscard]] const Renderer3D& GetCurrentRenderer() const noexcept { return *CurrentRenderer; }
|
||||||
void SetCurrentRenderer(std::unique_ptr<Renderer3D>&& renderer) noexcept { CurrentRenderer = std::move(renderer); }
|
void SetCurrentRenderer(std::unique_ptr<Renderer3D>&& renderer) noexcept;
|
||||||
|
|
||||||
u8 Read8(u32 addr) noexcept;
|
u8 Read8(u32 addr) noexcept;
|
||||||
u16 Read16(u32 addr) noexcept;
|
u16 Read16(u32 addr) noexcept;
|
||||||
|
@ -335,6 +335,7 @@ bool EmuThread::UpdateConsole(UpdateConsoleNDSArgs&& ndsargs, UpdateConsoleGBAAr
|
|||||||
NDS::Current = nullptr;
|
NDS::Current = nullptr;
|
||||||
|
|
||||||
NDS = CreateConsole(std::move(nextndscart), std::move(nextgbacart));
|
NDS = CreateConsole(std::move(nextndscart), std::move(nextgbacart));
|
||||||
|
NDS->Reset();
|
||||||
NDS::Current = NDS.get();
|
NDS::Current = NDS.get();
|
||||||
|
|
||||||
return NDS != nullptr;
|
return NDS != nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user