Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core / VideoCommon: refactor FreeLookCamera #9670

Merged
merged 4 commits into from Oct 9, 2021

Conversation

iwubcode
Copy link
Contributor

@iwubcode iwubcode commented Apr 25, 2021

This just refactors the FreeLookCamera so things that it previously managed (dirty state, field of view, etc) come from the controller. Also the controller has been split into the base controller and a new controller called CameraControllerInput which all current controllers derive from. This will be used in a future PR.

Source/Core/Core/FreeLookManager.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/FreeLookCamera.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/FreeLookCamera.h Outdated Show resolved Hide resolved
@iwubcode iwubcode force-pushed the freelook-input-controller branch from ce41749 to 8a145d9 Compare May 8, 2021 19:18
@iwubcode iwubcode requested a review from Pokechu22 May 8, 2021 19:43
Source/Core/VideoCommon/FreeLookCamera.h Outdated Show resolved Hide resolved
@@ -319,10 +310,7 @@ void FreeLookCamera::DoState(PointerWrap& p)
else
{
const auto old_type = m_current_type;
Copy link
Contributor

@Pokechu22 Pokechu22 May 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also a warning (for the const std::string old_type_name = old_type ? to_string(*old_type) : "" line) on the ubuntu builder that old_type may be uninitialized. This might be a GCC bug, but it's odd. (It also isn't new to this PR). Possibly switching to an EnumFormatter here would work, though I'm not sure. It's probably fine to just ignore this.

@iwubcode iwubcode force-pushed the freelook-input-controller branch from f87d006 to 9f990a3 Compare May 8, 2021 20:06
@JMC47
Copy link
Contributor

JMC47 commented Oct 9, 2021

This was approved by @Pokechu22, so I'm assuming it's good. Any objections to merging?

@JMC47 JMC47 merged commit 1beaa07 into dolphin-emu:master Oct 9, 2021
10 checks passed
@iwubcode iwubcode deleted the freelook-input-controller branch October 9, 2021 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants