MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / engine_update_frame

Function engine_update_frame

engine/source/platformAndroid/T2DActivity.cpp:856–885  ·  view source on GitHub ↗

* update callback */

Source from the content-addressed store, hash-verified

854 * update callback
855 */
856static void engine_update_frame(struct engine* engine) {
857
858 if (bSuspended == true)
859 return;
860
861 double thisSysTime = timeGetTime();
862 float timeElapsed = (thisSysTime-lastSystemTime)/1000.0f;
863 if (timeElapsed > 1.0f)
864 timeElapsed = 1.0f; // clamp it
865
866 lastSystemTime = thisSysTime;
867
868 if (keyboardShowing) {
869 if (keyboardTransition > 0.0f) {
870 keyboardTransition -= timeElapsed * 2.0f;
871 if (keyboardTransition < 0.0f)
872 keyboardTransition = 0.0f;
873 }
874 } else {
875 if (keyboardTransition < 1.0f) {
876 keyboardTransition += timeElapsed * 2.0f;
877 if (keyboardTransition > 1.0f)
878 keyboardTransition = 1.0f;
879 }
880 }
881
882 if (SetupCompleted == true)
883 _AndroidGameInnerLoop();
884
885}
886
887/**
888 * Tear down the EGL context currently associated with the display.

Callers 1

android_mainFunction · 0.85

Calls 2

_AndroidGameInnerLoopFunction · 0.85
timeGetTimeFunction · 0.70

Tested by

no test coverage detected