mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2024-11-12 02:00:53 +01:00
just use setVerticalSync and USE IT RIGHT
This commit is contained in:
parent
58ffd55144
commit
7ea114eb59
10
src/main.cpp
10
src/main.cpp
@ -52,11 +52,9 @@ int main() {
|
||||
|
||||
config::Config config{settings_folder};
|
||||
const auto video_mode = sf::VideoMode{config.windows.main_window_size.x, config.windows.main_window_size.y};
|
||||
sf::RenderWindow window;
|
||||
sf::RenderWindow window{video_mode, "F.E.I.S"};
|
||||
window.setVerticalSyncEnabled(true);
|
||||
window.setFramerateLimit(60);
|
||||
window.setKeyRepeatEnabled(false);
|
||||
window.create(video_mode, "F.E.I.S");
|
||||
|
||||
ImGui::SFML::Init(window, false);
|
||||
|
||||
@ -814,6 +812,12 @@ int main() {
|
||||
}
|
||||
}
|
||||
ImGui::EndMainMenuBar();
|
||||
|
||||
if (ImGui::Begin("Debug")) {
|
||||
ImGui::TextUnformatted(fmt::format("frame time : {}ms", delta.asMilliseconds()).c_str());
|
||||
ImGui::TextUnformatted(fmt::format("{:.0f} fps", 1.0f / delta.asSeconds()).c_str());
|
||||
}
|
||||
ImGui::End();
|
||||
ImGui::SFML::Render(window);
|
||||
window.display();
|
||||
markers.update();
|
||||
|
Loading…
Reference in New Issue
Block a user