13 class MSXEventDistributor;
14 class StateChangeDistributor;
15 class CommandController;
16 class PluggingController;
25 #ifndef SDL_JOYSTICK_DISABLED
42 SDL_Joystick* joystick);
44 #ifndef SDL_JOYSTICK_DISABLED
49 #ifndef SDL_JOYSTICK_DISABLED
51 [[nodiscard]] std::string_view
getName()
const override;
57 [[nodiscard]]
byte read(EmuTime::param time)
override;
58 void write(
byte value, EmuTime::param time)
override;
60 template<
typename Archive>
61 void serialize(Archive& ar,
unsigned version);
65 [[nodiscard]]
byte calcState();
68 void createEvent(EmuTime::param time,
byte newStatus);
71 void signalMSXEvent(
const std::shared_ptr<const Event>& event,
72 EmuTime::param time) noexcept
override;
74 void signalStateChange(
const std::shared_ptr<StateChange>& event)
override;
75 void stopReplay(EmuTime::param time) noexcept
override;
81 SDL_Joystick*
const joystick;
82 const unsigned joyNum;
84 const std::string name;
85 const std::string desc;
Represents something you can plug devices into.
This class contains settings that are used by several other class (including some singletons).
A Setting with an integer value.
Uses an SDL joystick to emulate an MSX joystick.
std::string_view getName() const override
Name used to identify this pluggable.
void unplugHelper(EmuTime::param time) override
std::string_view getDescription() const override
Description for this pluggable.
void write(byte value, EmuTime::param time) override
Write a value to the joystick device.
void plugHelper(Connector &connector, EmuTime::param time) override
static void registerAll(MSXEventDistributor &eventDistributor, StateChangeDistributor &stateChangeDistributor, CommandController &commandController, GlobalSettings &globalSettings, PluggingController &controller)
Register all available SDL joysticks.
void serialize(Archive &ar, unsigned version)
byte read(EmuTime::param time) override
Read from the joystick device.
Joystick(MSXEventDistributor &eventDistributor, StateChangeDistributor &stateChangeDistributor, CommandController &commandController, GlobalSettings &globalSettings, SDL_Joystick *joystick)
Central administration of Connectors and Pluggables.
This file implemented 3 utility functions:
SERIALIZE_CLASS_VERSION(CassettePlayer, 2)