mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Simplify lv2_timer_thread management
This commit is contained in:
parent
87fc5e4923
commit
89b8be98d6
1 changed files with 6 additions and 3 deletions
|
@ -25,7 +25,7 @@ struct lv2_timer_thread
|
||||||
lv2_timer_thread();
|
lv2_timer_thread();
|
||||||
void operator()();
|
void operator()();
|
||||||
|
|
||||||
SAVESTATE_INIT_POS(46); // Dependency on LV2 objects (lv2_timer)
|
//SAVESTATE_INIT_POS(46); // FREE SAVESTATE_INIT_POS number
|
||||||
|
|
||||||
static constexpr auto thread_name = "Timer Thread"sv;
|
static constexpr auto thread_name = "Timer Thread"sv;
|
||||||
};
|
};
|
||||||
|
@ -105,10 +105,13 @@ u64 lv2_timer::check_unlocked(u64 _now) noexcept
|
||||||
|
|
||||||
lv2_timer_thread::lv2_timer_thread()
|
lv2_timer_thread::lv2_timer_thread()
|
||||||
{
|
{
|
||||||
|
Emu.DeferDeserialization([this]()
|
||||||
|
{
|
||||||
idm::select<lv2_obj, lv2_timer>([&](u32 id, lv2_timer&)
|
idm::select<lv2_obj, lv2_timer>([&](u32 id, lv2_timer&)
|
||||||
{
|
{
|
||||||
timers.emplace_back(idm::get_unlocked<lv2_obj, lv2_timer>(id));
|
timers.emplace_back(idm::get_unlocked<lv2_obj, lv2_timer>(id));
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv2_timer_thread::operator()()
|
void lv2_timer_thread::operator()()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue