commit 4c8a263cc92eda88255ddcbe5473625ac4b8db97 parent 2bc35b4e8a0971db4dc9b59711dd88db30b740ee Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Jan 8 18:21:24 +0200 Properly initialise last_xpos/last_ypos Diffstat:
main.cc | | | 4 | ++-- |
diff --git a/main.cc b/main.cc @@ -129,8 +129,8 @@ int main( int argc, char ** argv ) { _MM_SET_DENORMALS_ZERO_MODE( _MM_DENORMALS_ZERO_ON ); _MM_SET_FLUSH_ZERO_MODE( _MM_FLUSH_ZERO_ON ); - double last_xpos = 0.0; - double last_ypos = 0.0; + double last_xpos, last_ypos; + glfwGetCursorPos( window, &last_xpos, &last_ypos ); while( !glfwWindowShouldClose( window ) ) { const double current_frame_time = glfwGetTime();