[Memory] Trigger watches when making pages writable, not the other way around
This commit is contained in:
@@ -170,8 +170,8 @@ dword_result_t NtReadFile(dword_t file_handle, dword_t event_handle,
|
||||
if (XSUCCEEDED(result)) {
|
||||
if (true || file->is_synchronous()) {
|
||||
// some games NtReadFile() directly into texture memory
|
||||
// TODO(rick): better checking of physical address
|
||||
if (buffer.guest_address() >= 0xA0000000) {
|
||||
auto heap = kernel_memory()->LookupHeap(buffer.guest_address());
|
||||
if (heap && heap->IsGuestPhysicalHeap()) {
|
||||
kernel_memory()->TriggerWatches(buffer.guest_address(), buffer_length,
|
||||
true, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user