mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-24 07:05:34 -07:00
Const some stuff
This commit is contained in:
parent
36c66edf3a
commit
fbce055324
3 changed files with 7 additions and 6 deletions
|
@ -20,14 +20,15 @@ namespace Ship {
|
||||||
void Read(OSContPad* pad);
|
void Read(OSContPad* pad);
|
||||||
virtual void ReadFromSource() = 0;
|
virtual void ReadFromSource() = 0;
|
||||||
virtual void WriteToSource(ControllerCallback* controller) = 0;
|
virtual void WriteToSource(ControllerCallback* controller) = 0;
|
||||||
|
virtual bool Connected() const = 0;
|
||||||
virtual bool CanRumble() const = 0;
|
virtual bool CanRumble() const = 0;
|
||||||
virtual bool Connected() = 0;
|
|
||||||
bool isRumbling;
|
bool isRumbling;
|
||||||
|
|
||||||
void SetButtonMapping(const std::string& szButtonName, int32_t dwScancode);
|
void SetButtonMapping(const std::string& szButtonName, int32_t dwScancode);
|
||||||
std::shared_ptr<ControllerAttachment> GetAttachment() { return Attachment; }
|
std::shared_ptr<ControllerAttachment> GetAttachment() { return Attachment; }
|
||||||
int32_t GetControllerNumber() { return dwControllerNumber; }
|
int32_t GetControllerNumber() { return dwControllerNumber; }
|
||||||
virtual bool HasPadConf() = 0;
|
|
||||||
|
virtual bool HasPadConf() const = 0;
|
||||||
virtual std::optional<std::string> GetPadConfSection() = 0;
|
virtual std::optional<std::string> GetPadConfSection() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -10,15 +10,15 @@ namespace Ship {
|
||||||
|
|
||||||
void ReadFromSource();
|
void ReadFromSource();
|
||||||
void WriteToSource(ControllerCallback* controller);
|
void WriteToSource(ControllerCallback* controller);
|
||||||
|
bool Connected() const { return true; }
|
||||||
bool CanRumble() const { return false; }
|
bool CanRumble() const { return false; }
|
||||||
bool Connected() { return true; }
|
|
||||||
|
|
||||||
bool PressButton(int32_t dwScancode);
|
bool PressButton(int32_t dwScancode);
|
||||||
bool ReleaseButton(int32_t dwScancode);
|
bool ReleaseButton(int32_t dwScancode);
|
||||||
void ReleaseAllButtons();
|
void ReleaseAllButtons();
|
||||||
|
|
||||||
|
bool HasPadConf() const { return false; }
|
||||||
std::optional<std::string> GetPadConfSection() { return {}; }
|
std::optional<std::string> GetPadConfSection() { return {}; }
|
||||||
bool HasPadConf() { return false; };
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string GetControllerType();
|
std::string GetControllerType();
|
||||||
|
|
|
@ -12,13 +12,13 @@ namespace Ship {
|
||||||
|
|
||||||
void ReadFromSource();
|
void ReadFromSource();
|
||||||
void WriteToSource(ControllerCallback* controller);
|
void WriteToSource(ControllerCallback* controller);
|
||||||
|
bool Connected() const { return Cont != nullptr; }
|
||||||
bool CanRumble() const { return SDL_GameControllerHasRumble(Cont); }
|
bool CanRumble() const { return SDL_GameControllerHasRumble(Cont); }
|
||||||
bool Connected() { return Cont != nullptr; }
|
|
||||||
|
|
||||||
std::string GetGuid() { return guid; };
|
std::string GetGuid() { return guid; };
|
||||||
|
|
||||||
|
bool HasPadConf() const { return true; }
|
||||||
std::optional<std::string> GetPadConfSection();
|
std::optional<std::string> GetPadConfSection();
|
||||||
bool HasPadConf() { return true; };
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string GetControllerType();
|
std::string GetControllerType();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue