Skip to content

Commit

Permalink
Add version to window title
Browse files Browse the repository at this point in the history
  • Loading branch information
karnkaul committed Nov 26, 2024
1 parent ae0d1d0 commit 906b2cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gui/src/app.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <app.hpp>
#include <locc/build_version.hpp>
#include <cstdlib>
#include <print>

Expand All @@ -19,7 +20,9 @@ App::App() : m_instance(m_queue, InstanceCreateInfo{.file_filter = &m_filter}) {
}

auto App::run() -> int {
auto window = gvdi::Context::create_window({640.0f, 360.0f}, "locc");
auto buf = CharBuf{};
std::format_to_n(buf.data(), buf.size(), "locc v{}", version_v);
auto window = gvdi::Context::create_window({640.0f, 360.0f}, buf.data());
if (!window) {
std::println(stderr, "Failed to create window");
return EXIT_FAILURE;
Expand Down

0 comments on commit 906b2cb

Please sign in to comment.