From 3dea5fd631c9513ed09b876f25e8bf6deff49683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Feb 2020 13:43:28 +0100 Subject: Remove incomplete battery status/power API It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770. --- platform/javascript/os_javascript.cpp | 18 ------------------ platform/javascript/os_javascript.h | 4 ---- 2 files changed, 22 deletions(-) (limited to 'platform/javascript') diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index d22e53e7ea..8ba2b39c85 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -1244,24 +1244,6 @@ String OS_JavaScript::get_resource_dir() const { return "/"; } -OS::PowerState OS_JavaScript::get_power_state() { - - WARN_PRINT("Power management is not supported for the HTML5 platform, defaulting to POWERSTATE_UNKNOWN"); - return OS::POWERSTATE_UNKNOWN; -} - -int OS_JavaScript::get_power_seconds_left() { - - WARN_PRINT("Power management is not supported for the HTML5 platform, defaulting to -1"); - return -1; -} - -int OS_JavaScript::get_power_percent_left() { - - WARN_PRINT("Power management is not supported for the HTML5 platform, defaulting to -1"); - return -1; -} - void OS_JavaScript::file_access_close_callback(const String &p_file, int p_flags) { OS_JavaScript *os = get_singleton(); diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 65a18830ed..5319ea121c 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -160,10 +160,6 @@ public: virtual String get_resource_dir() const; virtual String get_user_data_dir() const; - virtual OS::PowerState get_power_state(); - virtual int get_power_seconds_left(); - virtual int get_power_percent_left(); - void set_idb_available(bool p_idb_available); virtual bool is_userfs_persistent() const; -- cgit v1.2.3