79 auto& window = entt::locator<Window>::value();
80 auto& dispatcher = entt::locator<entt::dispatcher>::value();
85 constexpr const auto dt = std::chrono::duration<long long, std::ratio<1, 60>> {1};
88 using clock = std::chrono::steady_clock;
89 using duration =
decltype(clock::duration {} + dt);
90 using time_point = std::chrono::time_point<clock, duration>;
93 time_point prev = clock::now();
94 time_point now = clock::now();
100 while (window.is_open())
103 auto elapsed = now - prev;
121 window.process_events(dispatcher);
136 window.append_title(std::format(
"{0} | UPS: {1}, FPS: {2}",
Settings::title(), updates, frames));
245 if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK | SDL_INIT_GAMEPAD | SDL_INIT_EVENTS | SDL_INIT_HAPTIC | SDL_INIT_SENSOR))