mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Fixed memory leak
This commit is contained in:
parent
42a22dd4bb
commit
cd8c5fc2ea
7 changed files with 20 additions and 11 deletions
|
|
@ -37,6 +37,7 @@ HWND GetGameWindow()
|
|||
|
||||
bool Windows_Hook::start_hook()
|
||||
{
|
||||
bool res = true;
|
||||
if (!_hooked)
|
||||
{
|
||||
GetRawInputBuffer = ::GetRawInputBuffer;
|
||||
|
|
@ -51,7 +52,7 @@ bool Windows_Hook::start_hook()
|
|||
|
||||
_hooked = true;
|
||||
}
|
||||
return true;
|
||||
return res;
|
||||
}
|
||||
|
||||
void Windows_Hook::resetRenderState()
|
||||
|
|
@ -171,7 +172,7 @@ Windows_Hook::Windows_Hook() :
|
|||
GetRawInputBuffer(nullptr),
|
||||
GetRawInputData(nullptr)
|
||||
{
|
||||
|
||||
//_library = LoadLibrary(DLL_NAME);
|
||||
}
|
||||
|
||||
Windows_Hook::~Windows_Hook()
|
||||
|
|
@ -179,6 +180,8 @@ Windows_Hook::~Windows_Hook()
|
|||
PRINT_DEBUG("Windows Hook removed\n");
|
||||
|
||||
resetRenderState();
|
||||
|
||||
//FreeLibrary(reinterpret_cast<HMODULE>(_library));
|
||||
}
|
||||
|
||||
Windows_Hook& Windows_Hook::Inst()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue