mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-05 19:51:45 +00:00
dmnt-cheat: output value on EnableFrozenAddress
This commit is contained in:
parent
e734a5412a
commit
eddbd7c072
4 changed files with 6 additions and 5 deletions
|
@ -531,7 +531,7 @@ Result DmntCheatManager::GetFrozenAddress(FrozenAddressEntry *frz_addr, u64 add
|
|||
return 0;
|
||||
}
|
||||
|
||||
Result DmntCheatManager::EnableFrozenAddress(u64 address, u64 width) {
|
||||
Result DmntCheatManager::EnableFrozenAddress(u64 *out_value, u64 address, u64 width) {
|
||||
std::scoped_lock<HosMutex> lk(g_cheat_lock);
|
||||
|
||||
if (!HasActiveCheatProcess()) {
|
||||
|
@ -555,6 +555,7 @@ Result DmntCheatManager::EnableFrozenAddress(u64 address, u64 width) {
|
|||
}
|
||||
|
||||
g_frozen_addresses_map[address] = value;
|
||||
*out_value = value.value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class DmntCheatManager {
|
|||
static Result GetFrozenAddressCount(u64 *out_count);
|
||||
static Result GetFrozenAddresses(FrozenAddressEntry *frz_addrs, size_t max_count, u64 *out_count, u64 offset);
|
||||
static Result GetFrozenAddress(FrozenAddressEntry *frz_addr, u64 address);
|
||||
static Result EnableFrozenAddress(u64 address, u64 width);
|
||||
static Result EnableFrozenAddress(u64 *out_value, u64 address, u64 width);
|
||||
static Result DisableFrozenAddress(u64 address);
|
||||
|
||||
static void InitializeCheatManager();
|
||||
|
|
|
@ -158,7 +158,7 @@ Result DmntCheatService::GetFrozenAddress(Out<FrozenAddressEntry> entry, u64 add
|
|||
return DmntCheatManager::GetFrozenAddress(entry.GetPointer(), address);
|
||||
}
|
||||
|
||||
Result DmntCheatService::EnableFrozenAddress(u64 address, u64 width) {
|
||||
Result DmntCheatService::EnableFrozenAddress(Out<u64> out_value, u64 address, u64 width) {
|
||||
switch (width) {
|
||||
case 1:
|
||||
case 2:
|
||||
|
@ -169,7 +169,7 @@ Result DmntCheatService::EnableFrozenAddress(u64 address, u64 width) {
|
|||
return ResultDmntCheatInvalidFreezeWidth;
|
||||
}
|
||||
|
||||
return DmntCheatManager::EnableFrozenAddress(address, width);
|
||||
return DmntCheatManager::EnableFrozenAddress(out_value.GetPointer(), address, width);
|
||||
}
|
||||
|
||||
Result DmntCheatService::DisableFrozenAddress(u64 address) {
|
||||
|
|
|
@ -73,7 +73,7 @@ class DmntCheatService final : public IServiceObject {
|
|||
Result GetFrozenAddressCount(Out<u64> out_count);
|
||||
Result GetFrozenAddresses(OutBuffer<FrozenAddressEntry> addresses, Out<u64> out_count, u64 offset);
|
||||
Result GetFrozenAddress(Out<FrozenAddressEntry> entry, u64 address);
|
||||
Result EnableFrozenAddress(u64 address, u64 width);
|
||||
Result EnableFrozenAddress(Out<u64> out_value, u64 address, u64 width);
|
||||
Result DisableFrozenAddress(u64 address);
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue