Support VSync callback

This commit is contained in:
2024-05-15 21:43:12 +02:00
parent 3c0cc3bb6a
commit deb5bf8442
11 changed files with 156 additions and 49 deletions

View File

@@ -8,6 +8,10 @@ namespace JabyEngine {
void identify();
}
namespace Callbacks {
void setup();
}
namespace CD {
void setup();
}

View File

@@ -0,0 +1,21 @@
#pragma once
#include <PSX/System/threads.hpp>
namespace JabyEngine {
namespace Callback {
namespace internal {
namespace VSync {
static constexpr size_t StackSize = 64;
extern SysCall::ThreadHandle thread_handle;
extern uint32_t stack[StackSize];
void routine();
static void execute() {
MainThread::prepare_if_main(VSync::thread_handle);
Thread::execute_next();
}
}
}
}
}