WIP Backend System Redesign Step 1

- Created 1 Context for Backend Management and Sharing
- Made every class that used a static Backend require the Context or specific Backend
- Bring Back 3ds support
This commit is contained in:
2026-01-26 20:46:27 +01:00
parent 892f8ce0c4
commit e8072a064c
47 changed files with 350 additions and 242 deletions

View File

@@ -27,6 +27,6 @@ SOFTWARE.
#include <pd-3ds/bknd-hid.hpp>
namespace PD {
PD::Li::Font::Ref LoadSystemFont();
PD::Li::Font::Ref LoadSystemFont(Context& ctx);
void Init(void* data = nullptr);
} // namespace PD

View File

@@ -32,7 +32,7 @@ SOFTWARE.
namespace PD {
class GfxC3D : public GfxDriver {
public:
GfxC3D() : GfxDriver("Citro3D") {}
GfxC3D(PDDriverData data = nullptr) : GfxDriver("Citro3D") {}
~GfxC3D() = default;
PD_SHARED(GfxC3D);

View File

@@ -28,7 +28,7 @@ SOFTWARE.
namespace PD {
class Hid3DS : public HidDriver {
public:
Hid3DS();
Hid3DS(PDDriverData data = nullptr);
~Hid3DS() = default;
PD_SHARED(Hid3DS);

View File

@@ -42,7 +42,7 @@ class LinearAllocator {
T* allocate(std::size_t n) {
if (n > max_size()) {
throw std::runtime_error("[PD] LinearAllocator: Bad alloc!");
PD::Throw("[PD] LinearAllocator: Bad alloc!");
}
return static_cast<T*>(linearAlloc(n * sizeof(T)));
}