MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MainLoop

Method MainLoop

src/video/sdl2_v.cpp:669–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667}
668
669void VideoDriver_SDL_Base::MainLoop()
670{
671#ifdef __EMSCRIPTEN__
672 /* Run the main loop event-driven, based on RequestAnimationFrame. */
673 emscripten_set_main_loop_arg(&this->EmscriptenLoop, this, 0, 1);
674#else
675 this->StartGameThread();
676
677 while (!_exit_game) {
678 LoopOnce();
679 }
680
681 this->StopGameThread();
682#endif
683}
684
685bool VideoDriver_SDL_Base::ChangeResolution(int w, int h)
686{

Callers 3

openttd_mainFunction · 0.45
GameLoopFunction · 0.45
HandleBootstrapFunction · 0.45

Calls 2

StartGameThreadMethod · 0.80
StopGameThreadMethod · 0.80

Tested by

no test coverage detected