mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
logs: implement logs::get_channels()
This commit is contained in:
parent
26cccead6e
commit
a867522b16
2 changed files with 21 additions and 0 deletions
|
@ -202,6 +202,24 @@ namespace logs
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> get_channels()
|
||||
{
|
||||
std::vector<std::string> result;
|
||||
|
||||
std::lock_guard lock(g_mutex);
|
||||
|
||||
for (auto&& p : get_logger()->channels)
|
||||
{
|
||||
// Copy names removing duplicates
|
||||
if (result.empty() || result.back() != p.first)
|
||||
{
|
||||
result.push_back(p.first);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Must be called in main() to stop accumulating messages in g_messages
|
||||
void set_init()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue