summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-03-16 09:33:01 +0100
committerGitHub <noreply@github.com>2021-03-16 09:33:01 +0100
commit3b0b221fcf912ec1e4303939fe824286f33cad16 (patch)
tree39f91e9d51502d6fc206be8bf66dcbeba27f0da8 /Source/Core/InputCommon/ControllerInterface
parent18d95dfcca463dd24e686d74066da96e27edbb3f (diff)
parent486a25dd2b3f3790a9dc7a4dd432ca91377b14b3 (diff)
Merge pull request #9567 from Dentomologist/fix_various_warnings
Fix various build warnings
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Touch/Touchscreen.h12
-rw-r--r--Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp6
2 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Touch/Touchscreen.h b/Source/Core/InputCommon/ControllerInterface/Touch/Touchscreen.h
index ec060040d4..a47f24ec6a 100644
--- a/Source/Core/InputCommon/ControllerInterface/Touch/Touchscreen.h
+++ b/Source/Core/InputCommon/ControllerInterface/Touch/Touchscreen.h
@@ -15,9 +15,9 @@ private:
class Button : public Input
{
public:
- std::string GetName() const;
+ std::string GetName() const override;
Button(int pad_id, ButtonManager::ButtonType index) : m_pad_id(pad_id), m_index(index) {}
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
const int m_pad_id;
@@ -26,13 +26,13 @@ private:
class Axis : public Input
{
public:
- std::string GetName() const;
+ std::string GetName() const override;
bool IsDetectable() const override { return false; }
Axis(int pad_id, ButtonManager::ButtonType index, float neg = 1.0f)
: m_pad_id(pad_id), m_index(index), m_neg(neg)
{
}
- ControlState GetState() const;
+ ControlState GetState() const override;
private:
const int m_pad_id;
@@ -56,8 +56,8 @@ private:
public:
Touchscreen(int pad_id, bool accelerometer_enabled, bool gyroscope_enabled);
~Touchscreen() {}
- std::string GetName() const;
- std::string GetSource() const;
+ std::string GetName() const override;
+ std::string GetSource() const override;
private:
const int m_pad_id;
diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp
index 61b6a1e46b..214dd323ac 100644
--- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp
@@ -365,7 +365,7 @@ static void StopHotplugThread()
// Write something to efd so that select() stops blocking.
const uint64_t value = 1;
- static_cast<void>(write(s_wakeup_eventfd, &value, sizeof(uint64_t)));
+ static_cast<void>(!write(s_wakeup_eventfd, &value, sizeof(uint64_t)));
s_hotplug_thread.join();
close(s_wakeup_eventfd);
@@ -525,7 +525,7 @@ bool evdevDevice::AddNode(std::string devnode, int fd, libevdev* dev)
ie.code = FF_AUTOCENTER;
ie.value = 0;
- static_cast<void>(write(fd, &ie, sizeof(ie)));
+ static_cast<void>(!write(fd, &ie, sizeof(ie)));
}
// Constant FF effect
@@ -725,7 +725,7 @@ void evdevDevice::Effect::UpdateEffect()
play.code = m_effect.id;
play.value = 1;
- static_cast<void>(write(m_fd, &play, sizeof(play)));
+ static_cast<void>(!write(m_fd, &play, sizeof(play)));
}
else
{