We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0fa0dfb commit 6a57a1dCopy full SHA for 6a57a1d
1 file changed
klib/hardware/touch/touch.hpp
@@ -119,9 +119,9 @@ namespace klib::hardware::touch {
119
else {
120
// scale the x and y to the display width/height
121
const vector2<uint16_t> xy = (
122
- (position * vector2<uint16_t>{DisplayWidth, DisplayHeight}) /
123
- vector2<uint16_t>{Width, Height}
124
- );
+ (position.cast<uint32_t>() * vector2<uint32_t>{DisplayWidth, DisplayHeight}) /
+ vector2<uint32_t>{Width, Height}
+ ).cast<uint16_t>();
125
126
// update the id in the array
127
data[id] = {
0 commit comments