From 6e6c4d3045a09bfd359ae963a08eae98604e0537 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Fri, 16 May 2025 15:42:12 -0400 Subject: [PATCH] [Web] Always return `0` for `OS::get_process_id()` --- doc/classes/OS.xml | 2 +- platform/web/os_web.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index cd34a00a8e5..926ce622e21 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -441,7 +441,7 @@ Returns the number used by the host machine to uniquely identify this application. - [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS, and Windows. + [b]Note:[/b] On Web, this method always returns [code]0[/code]. diff --git a/platform/web/os_web.cpp b/platform/web/os_web.cpp index a56a8080603..3196ed21ddc 100644 --- a/platform/web/os_web.cpp +++ b/platform/web/os_web.cpp @@ -129,7 +129,7 @@ Error OS_Web::kill(const ProcessID &p_pid) { } int OS_Web::get_process_id() const { - ERR_FAIL_V_MSG(0, "OS::get_process_id() is not available on the Web platform."); + return 0; } bool OS_Web::is_process_running(const ProcessID &p_pid) const {