reworked ups/fps/paused logic
[physics.git] / src / main.cpp
index f94fac6..0efd748 100644 (file)
@@ -182,10 +182,14 @@ void updateFPSCounters()
 
         last_Second = tickCountMicro();
 
-#ifdef FPSUPS
-        cout << "ups:\t" << ups << endl;
-        cout << "fps:\t" << fps << endl;
-#endif
+        if(cfg::showFPS())
+        {
+            cout << "fps:\t" << fps << endl;
+        }
+        if(cfg::showUPS())
+        {
+            cout << "ups:\t" << ups << endl;
+        }
     }
 }
 
@@ -209,6 +213,8 @@ void draw()
 {
     game::draw();
 
+    SDL_PumpEvents(); // has to be on the Draw thread for the Windows API
+
     SDL_GL_SwapBuffers();
 
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);