mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
overlays: properly remove outdated messages from the queue.
Fixes zombie item glitch if a newer message has shorter duration than the older message
This commit is contained in:
parent
2d4e02f277
commit
6fe41870ab
2 changed files with 12 additions and 5 deletions
|
@ -132,9 +132,16 @@ namespace rsx
|
||||||
{
|
{
|
||||||
const u64 cur_time = rsx::uclock();
|
const u64 cur_time = rsx::uclock();
|
||||||
|
|
||||||
while (!vis_set.empty() && vis_set.front().get_expiration() < cur_time)
|
for (auto it = vis_set.begin(); it != vis_set.end();)
|
||||||
{
|
{
|
||||||
vis_set.pop_front();
|
if (it->get_expiration() < cur_time)
|
||||||
|
{
|
||||||
|
it = vis_set.erase(it);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
it++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (vis_set.size() < max_visible_items && !ready_set.empty())
|
while (vis_set.size() < max_visible_items && !ready_set.empty())
|
||||||
|
|
|
@ -39,7 +39,7 @@ namespace rsx
|
||||||
std::shared_ptr<atomic_t<u32>> m_refs;
|
std::shared_ptr<atomic_t<u32>> m_refs;
|
||||||
bool m_processed = false;
|
bool m_processed = false;
|
||||||
usz m_cur_pos = umax;
|
usz m_cur_pos = umax;
|
||||||
const u16 m_margin = 6;
|
static constexpr u16 m_margin = 6;
|
||||||
};
|
};
|
||||||
|
|
||||||
class message final : public overlay
|
class message final : public overlay
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue