mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-11-24 13:53:11 -05:00
Multi screen support, with dyn alignment (#2801)
This commit is contained in:
parent
23cabb8b8a
commit
371b6b5079
161 changed files with 4042 additions and 4157 deletions
|
|
@ -66,8 +66,11 @@ Metrics calculate_metrics(const Frame& frame) {
|
|||
}
|
||||
|
||||
ui::Point Calibration::translate(const DigitizerPoint& p) const {
|
||||
static constexpr range_t<int32_t> x_range{0, 240 - 1};
|
||||
static constexpr range_t<int32_t> y_range{0, 320 - 1};
|
||||
// static constexpr range_t<int32_t> x_range{0, 240 - 1};
|
||||
// static constexpr range_t<int32_t> y_range{0, 320 - 1};
|
||||
|
||||
static range_t<int32_t> x_range{0, screen_width - 1};
|
||||
static range_t<int32_t> y_range{0, screen_height - 1};
|
||||
|
||||
const int32_t x = (a * p.x + b * p.y + c) / k;
|
||||
const int32_t y = (d * p.x + e * p.y + f) / k;
|
||||
|
|
@ -133,4 +136,4 @@ ui::Point Manager::filtered_point() const {
|
|||
return persistent_memory::touch_calibration().translate({filter_x.value(), filter_y.value()});
|
||||
}
|
||||
|
||||
} /* namespace touch */
|
||||
} /* namespace touch */
|
||||
Loading…
Add table
Add a link
Reference in a new issue