mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 21:00:06 +00:00
Backport review comments from yuzu-emu/yuzu#4382: "yuzu: Add motion and touch configuration from Citra" (#5543)
This commit is contained in:
parent
a93d7a8d3a
commit
14924e9db3
9 changed files with 127 additions and 108 deletions
|
@ -30,19 +30,19 @@ public:
|
|||
if (state) {
|
||||
const float x = static_cast<float>(std::get<1>(m)) / Core::kScreenBottomWidth;
|
||||
const float y = static_cast<float>(std::get<2>(m)) / Core::kScreenBottomHeight;
|
||||
return std::make_tuple(x, y, true);
|
||||
return {x, y, true};
|
||||
}
|
||||
}
|
||||
return std::make_tuple(0.0f, 0.0f, false);
|
||||
return {};
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<std::tuple<std::unique_ptr<Input::ButtonDevice>, int, int>> map; // button, x, y
|
||||
// A vector of the mapped button, its x and its y-coordinate
|
||||
std::vector<std::tuple<std::unique_ptr<Input::ButtonDevice>, int, int>> map;
|
||||
};
|
||||
|
||||
std::unique_ptr<Input::TouchDevice> TouchFromButtonFactory::Create(
|
||||
const Common::ParamPackage& params) {
|
||||
|
||||
return std::make_unique<TouchFromButtonDevice>();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue