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();
|
||||
|
||||
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())
|
||||
|
|
|
@ -37,9 +37,9 @@ namespace rsx
|
|||
u64 m_expiration_time = 0;
|
||||
u64 m_visible_duration = 0;
|
||||
std::shared_ptr<atomic_t<u32>> m_refs;
|
||||
bool m_processed = false;
|
||||
usz m_cur_pos = umax;
|
||||
const u16 m_margin = 6;
|
||||
bool m_processed = false;
|
||||
usz m_cur_pos = umax;
|
||||
static constexpr u16 m_margin = 6;
|
||||
};
|
||||
|
||||
class message final : public overlay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue