mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2025-03-01 07:50:25 +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};
|
config::Config config{settings_folder};
|
||||||
const auto video_mode = sf::VideoMode{config.windows.main_window_size.x, config.windows.main_window_size.y};
|
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.setVerticalSyncEnabled(true);
|
||||||
window.setFramerateLimit(60);
|
|
||||||
window.setKeyRepeatEnabled(false);
|
window.setKeyRepeatEnabled(false);
|
||||||
window.create(video_mode, "F.E.I.S");
|
|
||||||
|
|
||||||
ImGui::SFML::Init(window, false);
|
ImGui::SFML::Init(window, false);
|
||||||
|
|
||||||
@ -814,6 +812,12 @@ int main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::EndMainMenuBar();
|
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);
|
ImGui::SFML::Render(window);
|
||||||
window.display();
|
window.display();
|
||||||
markers.update();
|
markers.update();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user