mirror of
https://github.com/open-goal/jak-project
synced 2026-08-28 00:41:58 -04:00
41ed4b1d7e
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!
26 lines
752 B
C++
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; };
|
|
};
|