mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 05:51:19 +12:00
Solve some locking issues
This commit is contained in:
parent
2d09952ef6
commit
d52800b7cd
1 changed files with 9 additions and 7 deletions
|
@ -90,15 +90,17 @@ namespace CameraManager
|
|||
|
||||
void Init()
|
||||
{
|
||||
std::scoped_lock lock(s_mutex);
|
||||
if (s_initialized)
|
||||
return;
|
||||
s_initialized = true;
|
||||
s_mutex.unlock();
|
||||
s_running = true;
|
||||
{
|
||||
std::scoped_lock lock(s_mutex);
|
||||
if (s_initialized)
|
||||
return;
|
||||
s_initialized = true;
|
||||
s_running = true;
|
||||
}
|
||||
s_ctx = Cap_createContext();
|
||||
|
||||
s_captureThread = std::thread(&CaptureWorker);
|
||||
|
||||
s_ctx = Cap_createContext();
|
||||
|
||||
const auto uniqueId = GetConfig().camera_id.GetValue();
|
||||
if (!uniqueId.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue