medfall

A super great game engine
Log | Files | Refs

commit 785071ed64125f0506ab20129836569eedc4af12
parent 7b7e210d7a3a8ed5452427a8954958b41ccae4b0
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Aug 29 00:25:43 +0100

Use window size instead of display size when centring cursor

Diffstat:
gl.cc | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gl.cc b/gl.cc @@ -170,7 +170,7 @@ GLFWwindow * gl_init( WindowType window_type ) { monitor_left + mode->width / 2 - total_width / 2, monitor_top + mode->height / 2 - total_height / 2 ); - glfwSetCursorPos( window, mode->width / 2, mode->height / 2 ); + glfwSetCursorPos( window, width / 2, height / 2 ); window_size = v2u32( checked_cast< u32 >( width ), checked_cast< u32 >( height ) );