Files
MesenCE/Core/WS/WsControlManager.h
SourMesen e391fd8f9a Code: Add auto-formatting rules for C++ (clang-format) and enforce in CI via "clang-format" and "dotnet format" (#78)
* Code: Add auto-formatting rules for C++ projects (clang-format) and enforce code style via "clang-format" and "dotnet format"

* fix ui format warnings
2026-04-30 06:03:55 -07:00

40 lines
831 B
C++

#pragma once
#include "pch.h"
#include "Shared/SettingTypes.h"
#include "Shared/BaseControlManager.h"
#include "WS/WsTypes.h"
class WsConsole;
class WsControlManager final : public BaseControlManager
{
private:
WsControlManagerState _state = {};
WsConfig _prevConfig = {};
uint8_t _prevInput = 0;
bool _soundButtonPressed = false;
bool _needKeyIrq = false;
WsConsole* _console = nullptr;
public:
WsControlManager(Emulator* emu, WsConsole* console);
WsControlManagerState& GetState() { return _state; }
shared_ptr<BaseControlDevice> CreateControllerDevice(ControllerType type, uint8_t port) override;
void UpdateControlDevices() override;
void UpdateInputState() override;
void TriggerKeyIrq();
uint8_t Read();
void Write(uint8_t value);
bool IsSoundPressed();
void Serialize(Serializer& s) override;
};