Files
jak-project/game/system/hid/devices/input_device.h
T
Tyler Wilding 41ed4b1d7e ci: update to ubuntu 22.04 (#3860)
Ubuntu 20.04 is hitting it's next EOL stage in april
https://endoflife.date/ubuntu
And it's being removed from github actions in april to go along with
that
https://github.blog/changelog/2025-01-15-github-actions-ubuntu-20-runner-image-brownout-dates-and-other-breaking-changes/

Getting ahead of this before we have random failures, I'll update the
launcher along with this change for this month.

On the bright side, we can finally update clang-format!
2025-02-16 17:40:52 -05:00

26 lines
752 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) = 0;
virtual void close_device() = 0;
bool is_loaded() const { return m_loaded; };
};