mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Video mode setting cleanup.
This commit is contained in:
+5
-5
@@ -41,7 +41,7 @@
|
||||
|
||||
// Set the current video mode for the specified monitor
|
||||
//
|
||||
void _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* mode)
|
||||
void _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired)
|
||||
{
|
||||
if (_glfw.x11.randr.available)
|
||||
{
|
||||
@@ -82,10 +82,10 @@ void _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* mode)
|
||||
if (mi->modeFlags & RR_Interlace)
|
||||
continue;
|
||||
|
||||
unsigned int sizeDiff = (mi->width - mode->width) *
|
||||
(mi->width - mode->width) +
|
||||
(mi->height - mode->height) *
|
||||
(mi->height - mode->height);
|
||||
unsigned int sizeDiff = (mi->width - desired->width) *
|
||||
(mi->width - desired->width) +
|
||||
(mi->height - desired->height) *
|
||||
(mi->height - desired->height);
|
||||
|
||||
if (sizeDiff < leastSizeDiff)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user