mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Fix state reset in cellMic, cellAudio, cellCamera (#6761)
This commit is contained in:
parent
42aa4c5000
commit
1d07c40aa5
4 changed files with 20 additions and 2 deletions
|
|
@ -394,6 +394,7 @@ error_code cellCameraEnd()
|
|||
|
||||
// TODO
|
||||
g_camera->init = 0;
|
||||
g_camera->reset_state();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
@ -1356,6 +1357,19 @@ void camera_context::operator()()
|
|||
}
|
||||
}
|
||||
|
||||
void camera_context::reset_state()
|
||||
{
|
||||
read_mode = CELL_CAMERA_READ_FUNCCALL;
|
||||
is_streaming = false;
|
||||
is_attached = false;
|
||||
is_open = false;
|
||||
info.framerate = 0;
|
||||
std::memset(&attr, 0, sizeof(attr));
|
||||
|
||||
std::scoped_lock lock(mutex_notify_data_map);
|
||||
notify_data_map.clear();
|
||||
}
|
||||
|
||||
void camera_context::send_attach_state(bool attached)
|
||||
{
|
||||
std::lock_guard lock(mutex_notify_data_map);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue