mirror of
https://github.com/open-goal/jak-project
synced 2026-07-02 04:26:09 -04:00
bdaf088d4b
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
27 lines
808 B
C++
27 lines
808 B
C++
#pragma once
|
|
|
|
#include <optional>
|
|
|
|
#include "game/settings/settings.h"
|
|
#include "game/system/hid/input_bindings.h"
|
|
|
|
#include "third-party/SDL/include/SDL.h"
|
|
|
|
// A distinct input device. Only those devices that are "active" should be read
|
|
class InputDevice {
|
|
protected:
|
|
bool m_loaded = false;
|
|
std::shared_ptr<game_settings::InputSettings> m_settings;
|
|
|
|
public:
|
|
virtual ~InputDevice(){};
|
|
|
|
virtual void process_event(const SDL_Event& event,
|
|
const CommandBindingGroups& commands,
|
|
std::shared_ptr<PadData> data,
|
|
std::optional<InputBindAssignmentMeta>& bind_assignment,
|
|
bool ignore_inputs = false) = 0;
|
|
virtual void close_device() = 0;
|
|
bool is_loaded() const { return m_loaded; };
|
|
};
|