mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 11:26:56 +02:00
Query dirty region bits without constructing temporary snapshots
This commit is contained in:
@@ -88,8 +88,7 @@ public:
|
|||||||
template <DirtySource source>
|
template <DirtySource source>
|
||||||
[[nodiscard]] bool IsModified(uint64_t offset, uint64_t size) const {
|
[[nodiscard]] bool IsModified(uint64_t offset, uint64_t size) const {
|
||||||
const auto [start, end] = GetPageRange(m_cpu_addr + offset, size);
|
const auto [start, end] = GetPageRange(m_cpu_addr + offset, size);
|
||||||
const auto& bits = GetBits<source>();
|
return GetBits<source>().FirstRangeFrom(start).first < end;
|
||||||
return RegionBits(bits, start, end).Any();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <DirtySource source, bool enable>
|
template <DirtySource source, bool enable>
|
||||||
|
|||||||
Reference in New Issue
Block a user