File tree 1 file changed +6
-5
lines changed
core/platform/android/java/src/org/axmol/lib 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -97,18 +97,19 @@ public void onDrawFrame(final GL10 gl) {
97
97
} else {
98
98
final long now = System .nanoTime ();
99
99
final long interval = now - this .mLastTickInNanoSeconds ;
100
+
101
+ /*
102
+ * Render time MUST be counted in, or the FPS will slower than appointed.
103
+ */
104
+ this .mLastTickInNanoSeconds = now ;
105
+ AxmolRenderer .nativeRender ();
100
106
101
107
if (interval < AxmolRenderer .sAnimationInterval ) {
102
108
try {
103
109
Thread .sleep ((AxmolRenderer .sAnimationInterval - interval ) / AxmolRenderer .NANOSECONDSPERMICROSECOND );
104
110
} catch (final Exception e ) {
105
111
}
106
112
}
107
- /*
108
- * Render time MUST be counted in, or the FPS will slower than appointed.
109
- */
110
- this .mLastTickInNanoSeconds = System .nanoTime ();
111
- AxmolRenderer .nativeRender ();
112
113
}
113
114
}
114
115
You can’t perform that action at this time.
0 commit comments