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

Function loop

deps/SDL2/test/testrendercopyex.c:140–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void loop()
141{
142 int i;
143 SDL_Event event;
144
145 /* Check for events */
146
147 while (SDL_PollEvent(&event)) {
148 SDLTest_CommonEvent(state, &event, &done);
149 }
150 for (i = 0; i < state->num_windows; ++i) {
151 if (state->windows[i] == NULL)
152 continue;
153 Draw(&drawstates[i]);
154 }
155#ifdef __EMSCRIPTEN__
156 if (done) {
157 emscripten_cancel_main_loop();
158 }
159#endif
160}
161
162int
163main(int argc, char *argv[])

Callers 1

mainFunction · 0.70

Calls 3

SDL_PollEventFunction · 0.85
SDLTest_CommonEventFunction · 0.85
DrawFunction · 0.70

Tested by

no test coverage detected