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
|
@ -89,16 +89,18 @@ namespace CameraManager
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init()
|
void Init()
|
||||||
|
{
|
||||||
{
|
{
|
||||||
std::scoped_lock lock(s_mutex);
|
std::scoped_lock lock(s_mutex);
|
||||||
if (s_initialized)
|
if (s_initialized)
|
||||||
return;
|
return;
|
||||||
s_initialized = true;
|
s_initialized = true;
|
||||||
s_mutex.unlock();
|
|
||||||
s_running = true;
|
s_running = true;
|
||||||
|
}
|
||||||
|
s_ctx = Cap_createContext();
|
||||||
|
|
||||||
s_captureThread = std::thread(&CaptureWorker);
|
s_captureThread = std::thread(&CaptureWorker);
|
||||||
|
|
||||||
s_ctx = Cap_createContext();
|
|
||||||
|
|
||||||
const auto uniqueId = GetConfig().camera_id.GetValue();
|
const auto uniqueId = GetConfig().camera_id.GetValue();
|
||||||
if (!uniqueId.empty())
|
if (!uniqueId.empty())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue