Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CORE] Support for SetWindowTitle and InitWindow for web #3222

Merged
merged 3 commits into from
Aug 4, 2023
Merged

[CORE] Support for SetWindowTitle and InitWindow for web #3222

merged 3 commits into from
Aug 4, 2023

Conversation

VitusVeit
Copy link
Contributor

Changes:

SetWindowTitle and InitWindow will now change the current tab name of the browser, if compiled for the web platform.
They use the emscripten function emscripten_set_window_title.

Why:

As stated in the header file, the SetWindowTitle function works only for desktop.
But this feature can be useful also on the web, for example by setting the tab title to the one of your game/app to make it more recognizable without having to change the title manually in the HTML file or interacting directly with emscripten.

Status:

Tested on Windows 11 with the latest version of emscripten on chrome with raylib's basic window example with no errors nor code changes.

Changed SetWindowTitle's description
SetWindowTitle now works on web
InitWindow title now works with web platform too.
@raysan5 raysan5 merged commit d3058fe into raysan5:master Aug 4, 2023
@raysan5
Copy link
Owner

raysan5 commented Aug 4, 2023

@VitusVeit Nice improvement! Thank you very much!

@VitusVeit
Copy link
Contributor Author

No problem! And thank you for writing such a helpful library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants