11class MSXEventDistributor;
12class StateChangeDistributor;
13class PluggingController;
16#ifndef SDL_JOYSTICK_DISABLED
27 SDL_Joystick* joystick);
29#ifndef SDL_JOYSTICK_DISABLED
34#ifndef SDL_JOYSTICK_DISABLED
36 [[nodiscard]] std::string_view
getName()
const override;
42 [[nodiscard]] uint8_t
read(EmuTime::param time)
override;
43 void write(uint8_t value, EmuTime::param time)
override;
45 template<
typename Archive>
46 void serialize(Archive& ar,
unsigned version);
50 [[nodiscard]]
unsigned calcInitialState();
51 void checkTime(EmuTime::param time);
52 void createEvent(EmuTime::param time,
unsigned press,
unsigned release);
53 void createEvent(EmuTime::param time,
unsigned newStatus);
56 void signalMSXEvent(
const Event& event,
57 EmuTime::param time)
noexcept override;
59 void signalStateChange(
const StateChange& event)
override;
60 void stopReplay(EmuTime::param time)
noexcept override;
66 SDL_Joystick*
const joystick;
68 const std::string name;
69 const std::string desc;
Represents something you can plug devices into.
void unplugHelper(EmuTime::param time) override
JoyMega(MSXEventDistributor &eventDistributor, StateChangeDistributor &stateChangeDistributor, SDL_Joystick *joystick)
uint8_t read(EmuTime::param time) override
Read from the joystick device.
std::string_view getName() const override
Name used to identify this pluggable.
static void registerAll(MSXEventDistributor &eventDistributor, StateChangeDistributor &stateChangeDistributor, PluggingController &controller)
void plugHelper(Connector &connector, EmuTime::param time) override
std::string_view getDescription() const override
Description for this pluggable.
void write(uint8_t value, EmuTime::param time) override
Write a value to the joystick device.
void serialize(Archive &ar, unsigned version)
Central administration of Connectors and Pluggables.
Base class for all external MSX state changing events.
This file implemented 3 utility functions: