Skip to content

Commit

Permalink
ipts: Move definiton of Mode into Device
Browse files Browse the repository at this point in the history
  • Loading branch information
StollD committed Apr 20, 2024
1 parent 367c718 commit 884795e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/core/linux/runner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Runner {
throw common::Error<Error::RunnerInitError> {};

// Enable multitouch mode
m_ipts.set_mode(ipts::Mode::Multitouch);
m_ipts.set_mode(ipts::Device::Mode::Multitouch);

// Signal the application that the data flow has started.
m_application->on_start();
Expand Down Expand Up @@ -162,7 +162,7 @@ class Runner {

try {
// Disable multitouch mode
m_ipts.set_mode(ipts::Mode::Singletouch);
m_ipts.set_mode(ipts::Device::Mode::Singletouch);
} catch (const std::exception &e) {
spdlog::error(e.what());
}
Expand Down
11 changes: 6 additions & 5 deletions src/ipts/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ inline std::string format_as(DeviceError err)

} // namespace impl

enum class Mode : u8 {
Singletouch = 0,
Multitouch = 1,
};

class Device {
public:
using Error = impl::DeviceError;

public:
enum class Mode : u8 {
Singletouch = 0,
Multitouch = 1,
};

private:
// The (platform specific) HID device interface
std::shared_ptr<hid::Device> m_hid;
Expand Down

0 comments on commit 884795e

Please sign in to comment.