Merge pull request #9362 from iwubcode/freelook_fix_crash
VideoCommon: Fix crash that occurs on loading a fifo log when Free Look is enabled
This commit is contained in:
commit
2917af03ec
|
@ -175,6 +175,11 @@ private:
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
FreeLookCamera::FreeLookCamera()
|
||||||
|
{
|
||||||
|
SetControlType(FreeLook::ControlType::SixAxis);
|
||||||
|
}
|
||||||
|
|
||||||
void FreeLookCamera::SetControlType(FreeLook::ControlType type)
|
void FreeLookCamera::SetControlType(FreeLook::ControlType type)
|
||||||
{
|
{
|
||||||
if (m_current_type && *m_current_type == type)
|
if (m_current_type && *m_current_type == type)
|
||||||
|
|
|
@ -41,6 +41,7 @@ public:
|
||||||
class FreeLookCamera
|
class FreeLookCamera
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
FreeLookCamera();
|
||||||
void SetControlType(FreeLook::ControlType type);
|
void SetControlType(FreeLook::ControlType type);
|
||||||
Common::Matrix44 GetView();
|
Common::Matrix44 GetView();
|
||||||
Common::Vec2 GetFieldOfView() const;
|
Common::Vec2 GetFieldOfView() const;
|
||||||
|
|
|
@ -111,6 +111,7 @@ Renderer::Renderer(int backbuffer_width, int backbuffer_height, float backbuffer
|
||||||
CalculateTargetSize();
|
CalculateTargetSize();
|
||||||
|
|
||||||
m_is_game_widescreen = SConfig::GetInstance().bWii && Config::Get(Config::SYSCONF_WIDESCREEN);
|
m_is_game_widescreen = SConfig::GetInstance().bWii && Config::Get(Config::SYSCONF_WIDESCREEN);
|
||||||
|
g_freelook_camera.SetControlType(FreeLook::GetActiveConfig().camera_config.control_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
Renderer::~Renderer() = default;
|
Renderer::~Renderer() = default;
|
||||||
|
|
Loading…
Reference in New Issue