fix(window): the title a program passes to gl_open / gvk_open reaches the window
The runtime opens a game's window before main, titled with the program's name, and gl_open attached to it without passing its title on (render3d's gvk_open called win_open, which returns early on Windows and opened a second window on macOS). win_set_title in cocoa.ll / win32.ll (setTitle: / SetWindowTextW, UTF-8 -> UTF-16; a no-op without a window, stubbed headless) retitles it from gl_open, and win_open on an open window retitles it on both platforms. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
bb267ff3d5
commit
1256bbfec7
7 changed files with 93 additions and 3 deletions
8
changes/window-title.md
Normal file
8
changes/window-title.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
bump: patch
|
||||
type: fix
|
||||
A game's window takes the title it asks for. The runtime opens a game's window before `main`,
|
||||
titled with the `program` name, and `Gl.open` / render3d's `gl_open` and `gvk_open` attached
|
||||
to it without passing their title on, so a `program Valley` that opened "Maroon Lake" showed
|
||||
"Valley". `win_set_title` (cocoa.ll `setTitle:`, win32.ll `SetWindowTextW`, UTF-8 to UTF-16)
|
||||
now retitles it, and a second `win_open` on macOS retitles the open window instead of making
|
||||
another, as it already did on Windows.
|
||||
Loading…
Add table
Add a link
Reference in a new issue