瀏覽代碼

Don't actively wait for the next update on SFML

Streetwalrus Einstein 10 年之前
父節點
當前提交
7231b51840
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 1 0
      platform/nspire/public/platform.h
  2. 2 0
      src/engine/StateMachine.cpp

+ 1 - 0
platform/nspire/public/platform.h

@@ -4,6 +4,7 @@
 #include <cstdint>
 
 #define TIMER_FREQ 32768
+#define ACTIVE_WAIT
 
 typedef uint16_t *texture_data_t;
 

+ 2 - 0
src/engine/StateMachine.cpp

@@ -72,8 +72,10 @@ void STATEMACHINE::run()
             this->pop();
         }
 
+#ifdef ACTIVE_WAIT
         while (Timing::gettime() < loop_next)
             ;
+#endif
         loop_next += loop_time;
     }
 }