Add Aspect ratio output
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 6m31s
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 6m31s
This commit is contained in:
9
main.cpp
9
main.cpp
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user