mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
StateWrapper: Support switching modes
This commit is contained in:
parent
e98d109da2
commit
ca48b21ffc
|
@ -28,6 +28,7 @@ public:
|
||||||
bool IsReading() const { return (m_mode == Mode::Read); }
|
bool IsReading() const { return (m_mode == Mode::Read); }
|
||||||
bool IsWriting() const { return (m_mode == Mode::Write); }
|
bool IsWriting() const { return (m_mode == Mode::Write); }
|
||||||
Mode GetMode() const { return m_mode; }
|
Mode GetMode() const { return m_mode; }
|
||||||
|
void SetMode(Mode mode) { m_mode = mode; }
|
||||||
|
|
||||||
/// Overload for integral or floating-point types. Writes bytes as-is.
|
/// Overload for integral or floating-point types. Writes bytes as-is.
|
||||||
template<typename T, std::enable_if_t<std::is_integral_v<T> || std::is_floating_point_v<T>, int> = 0>
|
template<typename T, std::enable_if_t<std::is_integral_v<T> || std::is_floating_point_v<T>, int> = 0>
|
||||||
|
|
Loading…
Reference in a new issue