Prepare CD Callback handler
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace Callback {
|
||||
using Function = void (*)();
|
||||
|
||||
struct VSyncCallback {
|
||||
struct [[deprecated("Currently not supported")]] VSyncCallback {
|
||||
using Function = void (*)();
|
||||
|
||||
static Function callback;
|
||||
|
||||
static void install(Function function) {
|
||||
@@ -16,17 +16,5 @@ namespace JabyEngine {
|
||||
VSyncCallback::install(nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
struct DataReadyCallback {
|
||||
static Function callback;
|
||||
|
||||
static void install(Function function) {
|
||||
DataReadyCallback::callback = function;
|
||||
}
|
||||
|
||||
static void uninstall() {
|
||||
DataReadyCallback::install(nullptr);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@@ -44,6 +44,7 @@ namespace JabyEngine {
|
||||
}
|
||||
|
||||
static void restore() {
|
||||
SysCall::EnterCriticalSection();
|
||||
MainThread::prepare_restore();
|
||||
Thread::execute_next();
|
||||
}
|
||||
|
Reference in New Issue
Block a user