mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-02 09:18:36 +00:00
Common: Refactor PointerWrap
This commit is contained in:
parent
7fcc866c41
commit
f6b9acccfc
38 changed files with 108 additions and 106 deletions
|
@ -298,7 +298,7 @@ Common::Vec2 FreeLookCamera::GetFieldOfViewMultiplier() const
|
|||
|
||||
void FreeLookCamera::DoState(PointerWrap& p)
|
||||
{
|
||||
if (p.GetMode() == PointerWrap::MODE_WRITE || p.GetMode() == PointerWrap::MODE_MEASURE)
|
||||
if (p.IsWriteMode() || p.IsMeasureMode())
|
||||
{
|
||||
p.Do(m_current_type);
|
||||
if (m_camera_controller)
|
||||
|
@ -314,7 +314,7 @@ void FreeLookCamera::DoState(PointerWrap& p)
|
|||
{
|
||||
m_camera_controller->DoState(p);
|
||||
}
|
||||
else if (p.GetMode() == PointerWrap::MODE_READ)
|
||||
else if (p.IsReadMode())
|
||||
{
|
||||
const std::string old_type_name = old_type ? to_string(*old_type) : "";
|
||||
const std::string loaded_type_name = m_current_type ? to_string(*m_current_type) : "";
|
||||
|
@ -323,7 +323,7 @@ void FreeLookCamera::DoState(PointerWrap& p)
|
|||
"'{}'. Aborting load state",
|
||||
old_type_name, loaded_type_name);
|
||||
Core::DisplayMessage(message, 5000);
|
||||
p.SetMode(PointerWrap::MODE_VERIFY);
|
||||
p.SetVerifyMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue