diff --git a/stratosphere/dmnt/source/dmnt_cheat_manager.cpp b/stratosphere/dmnt/source/dmnt_cheat_manager.cpp index 274fc97..98d8453 100644 --- a/stratosphere/dmnt/source/dmnt_cheat_manager.cpp +++ b/stratosphere/dmnt/source/dmnt_cheat_manager.cpp @@ -531,7 +531,7 @@ return 0; } -Result DmntCheatManager::EnableFrozenAddress(u64 address, u64 width) { +Result DmntCheatManager::EnableFrozenAddress(u64 *out_value, u64 address, u64 width) { std::scoped_lock lk(g_cheat_lock); if (!HasActiveCheatProcess()) { @@ -555,6 +555,7 @@ } g_frozen_addresses_map[address] = value; + *out_value = value.value; return 0; } diff --git a/stratosphere/dmnt/source/dmnt_cheat_manager.hpp b/stratosphere/dmnt/source/dmnt_cheat_manager.hpp index 37525ad..d1deb8b 100644 --- a/stratosphere/dmnt/source/dmnt_cheat_manager.hpp +++ b/stratosphere/dmnt/source/dmnt_cheat_manager.hpp @@ -67,7 +67,7 @@ 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(); diff --git a/stratosphere/dmnt/source/dmnt_cheat_service.cpp b/stratosphere/dmnt/source/dmnt_cheat_service.cpp index 8ccd626..966c070 100644 --- a/stratosphere/dmnt/source/dmnt_cheat_service.cpp +++ b/stratosphere/dmnt/source/dmnt_cheat_service.cpp @@ -158,7 +158,7 @@ return DmntCheatManager::GetFrozenAddress(entry.GetPointer(), address); } -Result DmntCheatService::EnableFrozenAddress(u64 address, u64 width) { +Result DmntCheatService::EnableFrozenAddress(Out out_value, u64 address, u64 width) { switch (width) { case 1: case 2: @@ -169,7 +169,7 @@ return ResultDmntCheatInvalidFreezeWidth; } - return DmntCheatManager::EnableFrozenAddress(address, width); + return DmntCheatManager::EnableFrozenAddress(out_value.GetPointer(), address, width); } Result DmntCheatService::DisableFrozenAddress(u64 address) { diff --git a/stratosphere/dmnt/source/dmnt_cheat_service.hpp b/stratosphere/dmnt/source/dmnt_cheat_service.hpp index abb43d5..422e8cf 100644 --- a/stratosphere/dmnt/source/dmnt_cheat_service.hpp +++ b/stratosphere/dmnt/source/dmnt_cheat_service.hpp @@ -73,7 +73,7 @@ Result GetFrozenAddressCount(Out out_count); Result GetFrozenAddresses(OutBuffer addresses, Out out_count, u64 offset); Result GetFrozenAddress(Out entry, u64 address); - Result EnableFrozenAddress(u64 address, u64 width); + Result EnableFrozenAddress(Out out_value, u64 address, u64 width); Result DisableFrozenAddress(u64 address); public: