| 864 | } |
| 865 | |
| 866 | static UpdateResult EngineUpdate(void* _engine) |
| 867 | { |
| 868 | EngineCtx* engine = (EngineCtx*)_engine; |
| 869 | engine->m_WasRun++; |
| 870 | uint64_t t = dmTime::GetMonotonicTime(); |
| 871 | /* |
| 872 | float elapsed = (t - engine->m_TimeStart) / 1000000.0f; |
| 873 | if (elapsed > 3.0f) |
| 874 | return RESULT_EXIT; |
| 875 | */ |
| 876 | |
| 877 | if (!engine->m_Running) |
| 878 | { |
| 879 | return RESULT_EXIT; |
| 880 | } |
| 881 | |
| 882 | dmPlatform::PollEvents(engine->m_Window); |
| 883 | |
| 884 | if (engine->m_WindowClosed) |
| 885 | { |
| 886 | return RESULT_EXIT; |
| 887 | } |
| 888 | |
| 889 | JobSystemUpdate(engine->m_JobContext, 0); |
| 890 | |
| 891 | dmGraphics::BeginFrame(engine->m_GraphicsContext); |
| 892 | |
| 893 | engine->m_Test->Execute(engine); |
| 894 | |
| 895 | dmGraphics::Flip(engine->m_GraphicsContext); |
| 896 | |
| 897 | return RESULT_OK; |
| 898 | } |
| 899 | |
| 900 | static void EngineGetResult(void* _engine, int* run_action, int* exit_code, int* argc, char*** argv) |
| 901 | { |
nothing calls this directly
no test coverage detected