mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 20:38:07 +01:00
44d583ee7d
Hook_Manager now only manages hooks. Renderer_Detector is used to detect the game's renderer. There will be 2 version of it. 1 for windows and 1 for Linux.
36 lines
No EOL
535 B
C++
36 lines
No EOL
535 B
C++
#include "../dll/dll.h"
|
|
#include "Hook_Manager.h"
|
|
|
|
#ifndef NO_OVERLAY
|
|
|
|
Hook_Manager::Hook_Manager()
|
|
{}
|
|
|
|
Hook_Manager::~Hook_Manager()
|
|
{
|
|
for (auto& i : _hooks)
|
|
delete i;
|
|
}
|
|
|
|
Hook_Manager& Hook_Manager::Inst()
|
|
{
|
|
static Hook_Manager hook;
|
|
return hook;
|
|
}
|
|
|
|
void Hook_Manager::AddHook(Base_Hook* hook)
|
|
{
|
|
_hooks.insert(hook);
|
|
}
|
|
|
|
void Hook_Manager::RemoveHook(Base_Hook* hook)
|
|
{
|
|
auto it = _hooks.find(hook);
|
|
if (it != _hooks.end())
|
|
{
|
|
delete hook;
|
|
_hooks.erase(it);
|
|
}
|
|
}
|
|
|
|
#endif//NO_OVERLAY
|