Fix inverted Y-axis in window_pos_to_pixel() (#229)
- This fixes a regression caused by #228
This commit is contained in:
parent
c2454b01ab
commit
b2b8f1140d
|
@ -521,7 +521,7 @@ impl Pixels {
|
|||
let offset_height = pixels_height.min(physical_height) / 2.0;
|
||||
|
||||
let pixel_x = (pos.x / pos.w + offset_width).floor() as isize;
|
||||
let pixel_y = (-pos.y / pos.w + offset_height).floor() as isize;
|
||||
let pixel_y = (pos.y / pos.w + offset_height).floor() as isize;
|
||||
|
||||
if pixel_x < 0
|
||||
|| pixel_x >= self.context.texture_extent.width as isize
|
||||
|
|
Loading…
Reference in a new issue