Update rcore.c

SetWindowTitle now works on web
This commit is contained in:
vitopigno 2023-08-03 14:36:56 +02:00 committed by GitHub
parent 9ad3279455
commit 251f4308f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1736,13 +1736,16 @@ void SetWindowIcons(Image *images, int count)
#endif #endif
} }
// Set title for window (only PLATFORM_DESKTOP) // Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
void SetWindowTitle(const char *title) void SetWindowTitle(const char *title)
{ {
CORE.Window.title = title; CORE.Window.title = title;
#if defined(PLATFORM_DESKTOP) #if defined(PLATFORM_DESKTOP)
glfwSetWindowTitle(CORE.Window.handle, title); glfwSetWindowTitle(CORE.Window.handle, title);
#endif #endif
#if defined(PLATFORM_WEB)
emscripten_set_window_title(title);
#endif
} }
// Set window position on screen (windowed mode) // Set window position on screen (windowed mode)