13class MSXEventDistributor;
14class StateChangeDistributor;
15class CommandController;
16class 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]] uint8_t
read(EmuTime::param time)
override;
58 void write(uint8_t value, EmuTime::param time)
override;
60 template<
typename Archive>
61 void serialize(Archive& ar,
unsigned version);
65 [[nodiscard]] uint8_t calcState();
68 void createEvent(EmuTime::param time, uint8_t newStatus);
71 void signalMSXEvent(
const Event& event,
72 EmuTime::param time)
noexcept override;
74 void signalStateChange(
const StateChange& event)
override;
75 void stopReplay(EmuTime::param time)
noexcept override;
81 SDL_Joystick*
const joystick;
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.
void write(uint8_t value, EmuTime::param time) override
Write a value to the joystick device.
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.
uint8_t read(EmuTime::param time) override
Read from 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)
Joystick(MSXEventDistributor &eventDistributor, StateChangeDistributor &stateChangeDistributor, CommandController &commandController, GlobalSettings &globalSettings, SDL_Joystick *joystick)
Central administration of Connectors and Pluggables.
Base class for all external MSX state changing events.
This file implemented 3 utility functions:
std::variant< KeyUpEvent, KeyDownEvent, MouseMotionEvent, MouseButtonUpEvent, MouseButtonDownEvent, MouseWheelEvent, JoystickAxisMotionEvent, JoystickHatEvent, JoystickButtonUpEvent, JoystickButtonDownEvent, OsdControlReleaseEvent, OsdControlPressEvent, WindowEvent, TextEvent, FileDropEvent, QuitEvent, FinishFrameEvent, CliCommandEvent, GroupEvent, BootEvent, FrameDrawnEvent, BreakEvent, SwitchRendererEvent, TakeReverseSnapshotEvent, AfterTimedEvent, MachineLoadedEvent, MachineActivatedEvent, MachineDeactivatedEvent, MidiInReaderEvent, MidiInWindowsEvent, MidiInCoreMidiEvent, MidiInCoreMidiVirtualEvent, MidiInALSAEvent, Rs232TesterEvent, ImGuiDelayedActionEvent, ImGuiActiveEvent > Event
SERIALIZE_CLASS_VERSION(CassettePlayer, 2)