MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / SeekRelative

Method SeekRelative

pcsx2/StateWrapper.cpp:113–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113bool StateWrapper::ReadOnlyMemoryStream::SeekRelative(s32 count)
114{
115 if (count < 0)
116 {
117 if (static_cast<u32>(-count) > m_buf_position)
118 return false;
119
120 m_buf_position -= static_cast<u32>(-count);
121 return true;
122 }
123 else
124 {
125 if ((m_buf_position + static_cast<u32>(count)) > m_buf_length)
126 return false;
127
128 m_buf_position += static_cast<u32>(count);
129 return true;
130 }
131}
132
133StateWrapper::MemoryStream::MemoryStream(void* buf, u32 buf_length)
134 : m_buf(static_cast<u8*>(buf))

Callers 1

SkipBytesMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected