mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
Input: Fix connection count
and some minor commenting
This commit is contained in:
parent
8eb8755aea
commit
106de04485
10 changed files with 137 additions and 103 deletions
|
|
@ -93,8 +93,6 @@ void pad_thread::Init(const u32 max_connect)
|
|||
LOG_ERROR(GENERAL, "Failed to bind device %s to handler %s", input_cfg.player_device[i]->to_string(), handler_type.to_string());
|
||||
nullpad->bindPadToDevice(m_pads.back(), input_cfg.player_device[i]->to_string());
|
||||
}
|
||||
else if (handler_type != pad_handler::null)
|
||||
m_info.now_connect++;
|
||||
}
|
||||
|
||||
thread = std::make_shared<std::thread>(&pad_thread::ThreadFunc, this);
|
||||
|
|
@ -117,10 +115,13 @@ void pad_thread::ThreadFunc()
|
|||
active = true;
|
||||
while (active)
|
||||
{
|
||||
u32 connected = 0;
|
||||
for (auto& cur_pad_handler : handlers)
|
||||
{
|
||||
cur_pad_handler.second->ThreadProc();
|
||||
connected += cur_pad_handler.second->connected;
|
||||
}
|
||||
m_info.now_connect = connected;
|
||||
std::this_thread::sleep_for(1ms);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue