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

@@ -25,19 +25,19 @@ SOFTWARE.
#include <pd/drivers/drivers.hpp>
namespace PD {
PD_API Timer::Timer(bool autostart) {
PD_API Timer::Timer(OsDriver& os, bool autostart) : pOs(os) {
pIsRunning = autostart;
Reset();
}
PD_API void Timer::Reset() {
pStart = OS::GetTime();
pStart = pOs.GetTime();
pNow = pStart;
}
PD_API void Timer::Update() {
if (pIsRunning) {
pNow = OS::GetTime();
pNow = pOs.GetTime();
}
}

View File

@@ -25,13 +25,13 @@ SOFTWARE.
#include <pd/drivers/drivers.hpp>
namespace PD::TT {
PD_API void Beg(const std::string& id) {
auto trace = OS::GetTraceRef(id);
trace->SetStart(PD::OS::GetNanoTime());
PD_API void Beg(OsDriver& os, const std::string& id) {
auto trace = os.GetTraceRef(id);
trace->SetStart(os.GetNanoTime());
}
PD_API void End(const std::string& id) {
auto trace = OS::GetTraceRef(id);
trace->SetEnd(PD::OS::GetNanoTime());
PD_API void End(OsDriver& os, const std::string& id) {
auto trace = os.GetTraceRef(id);
trace->SetEnd(os.GetNanoTime());
}
} // namespace PD::TT