mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-23 03:15:58 -04:00
actually update m_applied in Patch
This commit is contained in:
parent
e399f21882
commit
e557a551d8
1 changed files with 8 additions and 2 deletions
|
@ -4,11 +4,17 @@
|
|||
using namespace geode::prelude;
|
||||
|
||||
bool Patch::apply() {
|
||||
return bool(tulip::hook::writeMemory(m_address, m_patch.data(), m_patch.size()));
|
||||
bool res = bool(tulip::hook::writeMemory(m_address, m_patch.data(), m_patch.size()));
|
||||
if (res)
|
||||
m_applied = true;
|
||||
return res;
|
||||
}
|
||||
|
||||
bool Patch::restore() {
|
||||
return bool(tulip::hook::writeMemory(m_address, m_original.data(), m_original.size()));
|
||||
bool res = bool(tulip::hook::writeMemory(m_address, m_original.data(), m_original.size()));
|
||||
if (res)
|
||||
m_applied = false;
|
||||
return res;
|
||||
}
|
||||
|
||||
Patch::Patch() : m_owner(nullptr), m_address(nullptr), m_applied(false), m_autoEnable(true) {}
|
||||
|
|
Loading…
Reference in a new issue