mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Core: Add Free Look controllers that are initialized at boot
This commit is contained in:
57
Source/Core/Core/FreeLookManager.h
Normal file
57
Source/Core/Core/FreeLookManager.h
Normal file
@ -0,0 +1,57 @@
|
||||
// Copyright 2020 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||
|
||||
class InputConfig;
|
||||
|
||||
namespace ControllerEmu
|
||||
{
|
||||
class ControlGroup;
|
||||
class Buttons;
|
||||
} // namespace ControllerEmu
|
||||
|
||||
enum class FreeLookGroup
|
||||
{
|
||||
Move,
|
||||
Speed,
|
||||
FieldOfView,
|
||||
Other
|
||||
};
|
||||
|
||||
namespace FreeLook
|
||||
{
|
||||
void Shutdown();
|
||||
void Initialize();
|
||||
void LoadInputConfig();
|
||||
bool IsInitialized();
|
||||
void UpdateInput();
|
||||
|
||||
InputConfig* GetInputConfig();
|
||||
ControllerEmu::ControlGroup* GetInputGroup(int pad_num, FreeLookGroup group);
|
||||
|
||||
} // namespace FreeLook
|
||||
|
||||
class FreeLookController final : public ControllerEmu::EmulatedController
|
||||
{
|
||||
public:
|
||||
explicit FreeLookController(unsigned int index);
|
||||
|
||||
std::string GetName() const override;
|
||||
void LoadDefaults(const ControllerInterface& ciface) override;
|
||||
|
||||
ControllerEmu::ControlGroup* GetGroup(FreeLookGroup group) const;
|
||||
void Update();
|
||||
|
||||
private:
|
||||
ControllerEmu::Buttons* m_move_buttons;
|
||||
ControllerEmu::Buttons* m_speed_buttons;
|
||||
ControllerEmu::Buttons* m_fov_buttons;
|
||||
ControllerEmu::Buttons* m_other_buttons;
|
||||
|
||||
const unsigned int m_index;
|
||||
};
|
Reference in New Issue
Block a user