Avoid some float logic
Also shuts up some VS2019 warnings
This commit is contained in:
parent
8b854a0c95
commit
ab82f014ae
1 changed files with 2 additions and 2 deletions
|
@ -140,7 +140,7 @@ void WindowBackend_Software_HandleWindowResize(unsigned int width, unsigned int
|
||||||
viewport_y = 0;
|
viewport_y = 0;
|
||||||
viewport_height = height;
|
viewport_height = height;
|
||||||
|
|
||||||
viewport_width = framebuffer_width * ((float)height / (float)framebuffer_height);
|
viewport_width = (framebuffer_width * height) / framebuffer_height;
|
||||||
viewport_x = (width - viewport_width) / 2;
|
viewport_x = (width - viewport_width) / 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -148,7 +148,7 @@ void WindowBackend_Software_HandleWindowResize(unsigned int width, unsigned int
|
||||||
viewport_x = 0;
|
viewport_x = 0;
|
||||||
viewport_width = width;
|
viewport_width = width;
|
||||||
|
|
||||||
viewport_height = framebuffer_height * ((float)width / (float)framebuffer_width);
|
viewport_height = (framebuffer_height * width) / framebuffer_width;
|
||||||
viewport_y = (height - viewport_height) / 2;
|
viewport_y = (height - viewport_height) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue