diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2018-04-13 23:51:32 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2018-07-07 12:39:08 -0500 |
| commit | 3969bf6d1c83acb7e3699bcd3c2715d5b85e2ea0 (patch) | |
| tree | ec9481f55fbe76a24e0b993ecb68aa7daeeb03b5 /Source/Core/InputCommon/InputProfile.h | |
| parent | 29b71fb9ce5d28e84a7aaabc1a3a65f2a551d42d (diff) | |
Input: Add hotkey to cycle the wiimote profile forward or backward
Co-authored-by: Barath Kannan <barathsotd@gmail.com>
Diffstat (limited to 'Source/Core/InputCommon/InputProfile.h')
| -rw-r--r-- | Source/Core/InputCommon/InputProfile.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/InputProfile.h b/Source/Core/InputCommon/InputProfile.h new file mode 100644 index 0000000000..09b617c398 --- /dev/null +++ b/Source/Core/InputCommon/InputProfile.h @@ -0,0 +1,39 @@ +// Copyright 2018 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#pragma once + +class InputConfig; + +namespace ControllerEmu +{ + class EmulatedController; +} + +#include <string> +#include <vector> + +namespace InputProfile +{ + enum class CycleDirection : int + { + Forward = 1, + Backward = -1 + }; + + class ProfileCycler + { + public: + void NextWiimoteProfile(); + void PreviousWiimoteProfile(); + private: + void CycleProfile(CycleDirection cycle_direction, InputConfig* device_configuration, int& profile_index); + std::vector<std::string> GetProfilesForDevice(InputConfig* device_configuration); + std::string GetProfile(CycleDirection cycle_direction, int& profile_index, const std::vector<std::string>& profiles); + void UpdateToProfile(const std::string& profile_filename, const std::vector<ControllerEmu::EmulatedController*>& controllers); + std::vector<ControllerEmu::EmulatedController*> GetControllersForDevice(InputConfig* device_configuration); + + int m_wiimote_profile_index = 0; + }; +} |
