aboutsummaryrefslogtreecommitdiff
path: root/src/NDS.h
diff options
context:
space:
mode:
authorJesse Talavera <jesse@jesse.tg>2023-12-15 08:53:31 -0500
committerGitHub <noreply@github.com>2023-12-15 14:53:31 +0100
commitc867a7f1c09b3c5f07e0772fcddabce07bcd7fe7 (patch)
treec8f7fc0b351ff945b4e581c63873dbd460b2aa32 /src/NDS.h
parent6f47c9ed4c0e5b1035089805f272c6965343f113 (diff)
Make the initial 3D renderer configurable via `NDSArgs` (#1913)
* Allow 3D renderers to be created without passing `GPU` to the constructor * Make the initial 3D renderer configurable via `NDSArgs` * Fix a compiler error
Diffstat (limited to 'src/NDS.h')
-rw-r--r--src/NDS.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/NDS.h b/src/NDS.h
index e178c4a..d485bd3 100644
--- a/src/NDS.h
+++ b/src/NDS.h
@@ -328,6 +328,14 @@ public:
Firmware& GetFirmware() { return SPI.GetFirmwareMem()->GetFirmware(); }
void SetFirmware(Firmware&& firmware) { SPI.GetFirmwareMem()->SetFirmware(std::move(firmware)); }
+ const Renderer3D& GetRenderer3D() const noexcept { return GPU.GetRenderer3D(); }
+ Renderer3D& GetRenderer3D() noexcept { return GPU.GetRenderer3D(); }
+ void SetRenderer3D(std::unique_ptr<Renderer3D>&& renderer) noexcept
+ {
+ if (renderer != nullptr)
+ GPU.SetRenderer3D(std::move(renderer));
+ }
+
virtual bool NeedsDirectBoot() const;
void SetupDirectBoot(const std::string& romname);
virtual void SetupDirectBoot();