| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
class InputConfig; |
| 7 |
|
| 8 |
namespace ControllerEmu |
| 9 |
{ |
| 10 |
class EmulatedController; |
| 11 |
} |
| 12 |
|
| 13 |
#include <string> |
| 14 |
#include <vector> |
| 15 |
|
| 16 |
namespace InputProfile |
| 17 |
{ |
| 18 |
std::vector<std::string> GetProfilesFromSetting(const std::string& setting, |
| 19 |
const std::string& root); |
| 20 |
|
| 21 |
enum class CycleDirection : int |
| 22 |
{ |
| 23 |
Forward = 1, |
| 24 |
Backward = -1 |
| 25 |
}; |
| 26 |
|
| 27 |
class ProfileCycler |
| 28 |
{ |
| 29 |
public: |
| 30 |
void NextWiimoteProfile(int controller_index); |
| 31 |
void PreviousWiimoteProfile(int controller_index); |
| 32 |
void NextWiimoteProfileForGame(int controller_index); |
| 33 |
void PreviousWiimoteProfileForGame(int controller_index); |
| 34 |
|
| 35 |
private: |
| 36 |
void CycleProfile(CycleDirection cycle_direction, InputConfig* device_configuration, |
| 37 |
int& profile_index, int controller_index); |
| 38 |
void CycleProfileForGame(CycleDirection cycle_direction, InputConfig* device_configuration, |
| 39 |
int& profile_index, const std::string& setting, int controller_index); |
| 40 |
std::vector<std::string> GetProfilesForDevice(InputConfig* device_configuration); |
| 41 |
std::string GetProfile(CycleDirection cycle_direction, int& profile_index, |
| 42 |
const std::vector<std::string>& profiles); |
| 43 |
std::vector<std::string> GetMatchingProfilesFromSetting(const std::string& setting, |
| 44 |
const std::vector<std::string>& profiles, |
| 45 |
InputConfig* device_configuration); |
| 46 |
void UpdateToProfile(const std::string& profile_filename, |
| 47 |
ControllerEmu::EmulatedController* controller, |
| 48 |
InputConfig* device_configuration); |
| 49 |
std::string GetWiimoteInputProfilesForGame(int controller_index); |
| 50 |
|
| 51 |
int m_wiimote_profile_index = 0; |
| 52 |
}; |
| 53 |
} |