2018-09-20 02:28:05 -04:00
|
|
|
// Copyright 2018 Citra Emulator Project
|
2017-01-21 10:33:48 -05:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-12-05 23:26:29 -05:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
2020-07-22 10:39:53 -04:00
|
|
|
#include "common/param_package.h"
|
2018-09-20 02:28:05 -04:00
|
|
|
#include "input_common/main.h"
|
2017-01-21 10:33:48 -05:00
|
|
|
|
2018-09-20 02:28:05 -04:00
|
|
|
namespace InputCommon::Polling {
|
2017-12-05 23:26:29 -05:00
|
|
|
class DevicePoller;
|
|
|
|
enum class DeviceType;
|
2018-09-20 02:28:05 -04:00
|
|
|
} // namespace InputCommon::Polling
|
2018-09-10 21:29:59 -04:00
|
|
|
|
2018-09-20 02:28:05 -04:00
|
|
|
namespace InputCommon::SDL {
|
2018-09-10 21:29:59 -04:00
|
|
|
|
2018-09-20 02:28:05 -04:00
|
|
|
class State {
|
|
|
|
public:
|
2019-03-18 11:26:13 -04:00
|
|
|
using Pollers = std::vector<std::unique_ptr<Polling::DevicePoller>>;
|
|
|
|
|
|
|
|
/// Unregisters SDL device factories and shut them down.
|
2018-09-20 02:28:05 -04:00
|
|
|
virtual ~State() = default;
|
2018-09-10 21:29:59 -04:00
|
|
|
|
2020-11-15 06:22:01 -05:00
|
|
|
virtual Pollers GetPollers(Polling::DeviceType) {
|
2020-07-22 10:39:53 -04:00
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual std::vector<Common::ParamPackage> GetInputDevices() {
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage&) {
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
virtual AnalogMapping GetAnalogMappingForDevice(const Common::ParamPackage&) {
|
|
|
|
return {};
|
|
|
|
}
|
2018-09-20 02:28:05 -04:00
|
|
|
};
|
2017-12-05 23:26:29 -05:00
|
|
|
|
2018-09-20 02:28:05 -04:00
|
|
|
class NullState : public State {
|
|
|
|
public:
|
|
|
|
};
|
2017-12-05 23:26:29 -05:00
|
|
|
|
2018-09-20 02:28:05 -04:00
|
|
|
std::unique_ptr<State> Init();
|
2017-12-05 23:26:29 -05:00
|
|
|
|
2018-09-20 02:28:05 -04:00
|
|
|
} // namespace InputCommon::SDL
|