Files
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

43 lines
805 B
C++

#pragma once
#include "pch.h"
#include "Shared/BaseControlDevice.h"
#include "Utilities/Serializer.h"
class SnesController : public BaseControlDevice
{
private:
uint32_t _stateBuffer = 0;
uint8_t _turboSpeed = 0;
protected:
string GetKeyNames() override;
void InternalSetStateFromInput() override;
uint16_t ToByte();
void Serialize(Serializer& s) override;
void RefreshStateBuffer() override;
public:
enum Buttons
{
A = 0,
B,
X,
Y,
L,
R,
Select,
Start,
Up,
Down,
Left,
Right
};
SnesController(Emulator* emu, uint8_t port, KeyMappingSet keyMappings);
uint8_t ReadRam(uint16_t addr) override;
void WriteRam(uint16_t addr, uint8_t value) override;
void InternalDrawController(InputHud& hud) override;
vector<DeviceButtonName> GetKeyNameAssociations() override;
};