mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-08 07:55:35 +00:00
std::shared_ptr in IdManager
This commit is contained in:
parent
b2de24db73
commit
d8239a39c9
47 changed files with 654 additions and 622 deletions
|
|
@ -23,7 +23,7 @@ bool EventManager::CheckKey(u64 key)
|
|||
return key_map.find(key) != key_map.end();
|
||||
}
|
||||
|
||||
bool EventManager::RegisterKey(EventQueue* data, u64 key)
|
||||
bool EventManager::RegisterKey(std::shared_ptr<EventQueue>& data, u64 key)
|
||||
{
|
||||
if (!key) return true;
|
||||
std::lock_guard<std::mutex> lock(m_lock);
|
||||
|
|
@ -40,7 +40,7 @@ bool EventManager::RegisterKey(EventQueue* data, u64 key)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool EventManager::GetEventQueue(u64 key, EventQueue*& data)
|
||||
bool EventManager::GetEventQueue(u64 key, std::shared_ptr<EventQueue>& data)
|
||||
{
|
||||
data = nullptr;
|
||||
if (!key) return false;
|
||||
|
|
@ -79,8 +79,7 @@ bool EventManager::SendEvent(u64 key, u64 source, u64 d1, u64 d2, u64 d3)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
EventQueue* eq = f->second;
|
||||
|
||||
eq->events.push(source, d1, d2, d3);
|
||||
|
||||
f->second->events.push(source, d1, d2, d3);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue