mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-02 06:48:03 +03:00
58 lines
1.2 KiB
C
58 lines
1.2 KiB
C
![]() |
// 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;
|
||
|
};
|