Support VSync callback
This commit is contained in:
@@ -8,6 +8,10 @@ namespace JabyEngine {
|
||||
void identify();
|
||||
}
|
||||
|
||||
namespace Callbacks {
|
||||
void setup();
|
||||
}
|
||||
|
||||
namespace CD {
|
||||
void setup();
|
||||
}
|
||||
|
||||
21
src/Library/internal-include/System/callbacks_internal.hpp
Normal file
21
src/Library/internal-include/System/callbacks_internal.hpp
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user