Add Aspect ratio output
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 6m31s

This commit is contained in:
2024-08-13 12:52:57 -04:00
parent 9d51ac0026
commit 1345669c32

View File

@@ -65,15 +65,20 @@ int main() {
auto w = display.getDefaultGraphicsMode().getWidth();
auto h = display.getDefaultGraphicsMode().getHeight();
auto r = display.getDefaultGraphicsMode().getRefreshRate();
auto aspect = (float)w/(float)h;
std::cout << "Default: ";
std::cout << std::format("Mode ({},{}) @ {}hz", w, h, r) << std::endl;
std::cout << std::format("Mode ({},{}) @ {}hz Ratio {}", w, h, r, aspect) << std::endl;
for (ReWindow::FullscreenGraphicsMode& fgm : display.getGraphicsModes()) {
w = fgm.getWidth();
h = fgm.getHeight();
r = fgm.getRefreshRate();
std::cout << std::format("Mode ({},{}) @ {}hz", w, h, r) << std::endl;
auto aspect = (float)w/(float)h;
std::cout << std::format("Mode ({},{}) @ {}hz Ratio {}", w, h, r, aspect) << std::endl;
}
}