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

Function engine_term_display

engine/source/platformAndroid/T2DActivity.cpp:890–914  ·  view source on GitHub ↗

* Tear down the EGL context currently associated with the display. */

Source from the content-addressed store, hash-verified

888 * Tear down the EGL context currently associated with the display.
889 */
890static void engine_term_display(struct engine* engine, bool shutdown) {
891
892 if (shutdown == true) {
893 _AndroidGameWillTerminate();
894 } else {
895 _AndroidGameResignActive();
896 }
897
898 activity.finishShutdown();
899
900 if (engine->display != EGL_NO_DISPLAY) {
901 eglMakeCurrent(engine->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
902 if (engine->context != EGL_NO_CONTEXT) {
903 eglDestroyContext(engine->display, engine->context);
904 }
905 if (engine->surface != EGL_NO_SURFACE) {
906 eglDestroySurface(engine->display, engine->surface);
907 }
908 eglTerminate(engine->display);
909 }
910 engine->animating = 0;
911 engine->display = EGL_NO_DISPLAY;
912 engine->context = EGL_NO_CONTEXT;
913 engine->surface = EGL_NO_SURFACE;
914}
915
916void keepScreenOn() {
917

Callers 3

engine_init_displayFunction · 0.85
engine_handle_cmdFunction · 0.85
android_mainFunction · 0.85

Calls 3

_AndroidGameResignActiveFunction · 0.85
finishShutdownMethod · 0.80

Tested by

no test coverage detected