MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / loop

Function loop

deps/SDL2/test/testrendertarget.c:225–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void
226loop()
227{
228 int i;
229 SDL_Event event;
230
231 /* Check for events */
232 while (SDL_PollEvent(&event)) {
233 SDLTest_CommonEvent(state, &event, &done);
234 }
235 for (i = 0; i < state->num_windows; ++i) {
236 if (state->windows[i] == NULL)
237 continue;
238 if (test_composite) {
239 if (!DrawComposite(&drawstates[i])) done = 1;
240 } else {
241 if (!Draw(&drawstates[i])) done = 1;
242 }
243 }
244#ifdef __EMSCRIPTEN__
245 if (done) {
246 emscripten_cancel_main_loop();
247 }
248#endif
249}
250
251int
252main(int argc, char *argv[])

Callers 1

mainFunction · 0.70

Calls 4

SDL_PollEventFunction · 0.85
SDLTest_CommonEventFunction · 0.85
DrawCompositeFunction · 0.85
DrawFunction · 0.70

Tested by

no test coverage detected