feat: added scheduling
This commit is contained in:
@@ -1,9 +1,29 @@
|
||||
#include <windows.h>
|
||||
#include <detail/fxn.hpp>
|
||||
|
||||
DWORD WINAPI ThreadProc(LPVOID lpParameter)
|
||||
#include <blackbase/library/library.hpp>
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
auto& fxnManager = fxn::FxnManager::GetInstance();
|
||||
}
|
||||
|
||||
DWORD WINAPI ThreadProc(LPVOID lpParameter)
|
||||
{
|
||||
auto currentLibrary = blackbase::Library::GetCurrent();
|
||||
if (!currentLibrary.has_value())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
auto name = currentLibrary->GetName();
|
||||
if (!name.contains("GameProcess") && !name.contains("GTAProcess"))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Sleep(5000);
|
||||
Initialize();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <detail/rage.hpp>
|
||||
#include <detail/dispatcher.hpp>
|
||||
#include <detail/hooking.hpp>
|
||||
#include <detail/scheduler.hpp>
|
||||
|
||||
#include <blackbase/xorstr.hpp>
|
||||
#include <blackbase/library/library.hpp>
|
||||
@@ -151,11 +152,12 @@ namespace fxn
|
||||
auto job = [this, context]()
|
||||
{
|
||||
this->InvokeNative(context);
|
||||
|
||||
context->SetExecuted(true);
|
||||
};
|
||||
|
||||
// TODO: Implement scheduling logic here.
|
||||
|
||||
// END OF TODO
|
||||
static auto& scheduler = fxn::NativeScheduler::GetInstance();
|
||||
scheduler.Schedule(job);
|
||||
|
||||
if (waitForCompletion)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user