[touchscreen] Fix coordinates when using rotation (#7591)

This commit is contained in:
Clyde Stubbs 2024-10-14 07:10:48 +11:00 committed by Jesse Hills
parent bafb0ad688
commit f52136338d
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -18,8 +18,8 @@ void Touchscreen::attach_interrupt_(InternalGPIOPin *irq_pin, esphome::gpio::Int
void Touchscreen::call_setup() { void Touchscreen::call_setup() {
if (this->display_ != nullptr) { if (this->display_ != nullptr) {
this->display_width_ = this->display_->get_native_width(); this->display_width_ = this->display_->get_width();
this->display_height_ = this->display_->get_native_height(); this->display_height_ = this->display_->get_height();
} }
PollingComponent::call_setup(); PollingComponent::call_setup();
} }