diff options
Diffstat (limited to 'src/input_common/touch_from_button.cpp')
| -rw-r--r-- | src/input_common/touch_from_button.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input_common/touch_from_button.cpp b/src/input_common/touch_from_button.cpp index 8e7f90253..d028dfa0d 100644 --- a/src/input_common/touch_from_button.cpp +++ b/src/input_common/touch_from_button.cpp | |||
| @@ -30,14 +30,15 @@ public: | |||
| 30 | static_cast<int>(Layout::ScreenUndocked::Width); | 30 | static_cast<int>(Layout::ScreenUndocked::Width); |
| 31 | const float y = static_cast<float>(std::get<2>(m)) / | 31 | const float y = static_cast<float>(std::get<2>(m)) / |
| 32 | static_cast<int>(Layout::ScreenUndocked::Height); | 32 | static_cast<int>(Layout::ScreenUndocked::Height); |
| 33 | return std::make_tuple(x, y, true); | 33 | return {x, y, true}; |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| 36 | return std::make_tuple(0.0f, 0.0f, false); | 36 | return {}; |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | private: | 39 | private: |
| 40 | std::vector<std::tuple<std::unique_ptr<Input::ButtonDevice>, int, int>> map; // button, x, y | 40 | // A vector of the mapped button, its x and its y-coordinate |
| 41 | std::vector<std::tuple<std::unique_ptr<Input::ButtonDevice>, int, int>> map; | ||
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 43 | std::unique_ptr<Input::TouchDevice> TouchFromButtonFactory::Create( | 44 | std::unique_ptr<Input::TouchDevice> TouchFromButtonFactory::Create( |