summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 517ccaec08..e753ac5e1a 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1293,12 +1293,15 @@ bool Main::iteration() {
uint64_t ticks=OS::get_singleton()->get_ticks_usec();
uint64_t ticks_elapsed=ticks-last_ticks;
+ double step=(double)ticks_elapsed / 1000000.0;
+ float frame_slice=1.0/OS::get_singleton()->get_iterations_per_second();
+
+ //if (time_accum+step < frame_slice)
+ // return false;
+
frame+=ticks_elapsed;
last_ticks=ticks;
- double step=(double)ticks_elapsed / 1000000.0;
-
- float frame_slice=1.0/OS::get_singleton()->get_iterations_per_second();
if (step>frame_slice*8)
step=frame_slice*8;
@@ -1309,7 +1312,6 @@ bool Main::iteration() {
bool exit=false;
-
int iters = 0;
while(time_accum>frame_slice) {