MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / reset_state

Method reset_state

ps3fw/cellCamera.cpp:1819–1851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1817}
1818
1819void camera_context::reset_state()
1820{
1821 read_mode = CELL_CAMERA_READ_FUNCCALL;
1822 is_streaming = false;
1823 is_attached = false;
1824 is_attached_dirty = false;
1825 is_open = false;
1826 info.framerate = 0;
1827 std::memset(&attr, 0, sizeof(attr));
1828 handler.reset();
1829 pbuf_write_index = 0;
1830 pbuf_locked[0] = false;
1831 pbuf_locked[1] = false;
1832 has_new_frame = false;
1833 frame_timestamp_us = 0;
1834 bytes_read = 0;
1835
1836 if (info.buffer)
1837 {
1838 vm::dealloc(info.buffer.addr(), vm::main);
1839 }
1840 if (info.pbuf[0])
1841 {
1842 vm::dealloc(info.pbuf[0].addr(), vm::main);
1843 }
1844 if (info.pbuf[1])
1845 {
1846 vm::dealloc(info.pbuf[1].addr(), vm::main);
1847 }
1848
1849 std::scoped_lock lock(mutex_notify_data_map);
1850 notify_data_map.clear();
1851}
1852
1853void camera_context::send_attach_state(bool attached)
1854{

Callers 1

cellCameraEndFunction · 0.45

Calls 4

deallocFunction · 0.85
resetMethod · 0.45
addrMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected