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

Function loop

deps/SDL2/test/testscale.c:130–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void
131loop()
132{
133 int i;
134 SDL_Event event;
135
136 /* Check for events */
137 while (SDL_PollEvent(&event)) {
138 SDLTest_CommonEvent(state, &event, &done);
139 }
140 for (i = 0; i < state->num_windows; ++i) {
141 if (state->windows[i] == NULL)
142 continue;
143 Draw(&drawstates[i]);
144 }
145#ifdef __EMSCRIPTEN__
146 if (done) {
147 emscripten_cancel_main_loop();
148 }
149#endif
150}
151
152int
153main(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