vendetta / src / window_title.v
15 lines · 14 sloc · 622 bytes · 59511ca6b236c69a5dcc3242efdcb78549a7d3c1
Raw
1// The window-title plumbing, kept apart because the import rule pins it to a
2// file head: apply_window_title pushes a title onto the OS window, and every
3// vendetta desktop build renders through ui2's custom GL renderer (the macOS
4// compile_error guard in main.v leans on it too), whose window is sokol's, so
5// the title goes through gg's sapp wrapper; android has no title bar and
6// ignores the call harmlessly.
7import gg
8
9$if android || linux || ((macos || windows) && ui2_custom_rendering ?) {
10 fn apply_window_title(title string) {
11 gg.set_window_title(title)
12 }
13} $else {
14 fn apply_window_title(_ string) {}
15}
16