mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-03 09:29:38 +01:00
Web: Clarify that OS.get_unique_id
is not supported
Remove the base error message in `OS`, we no longer really error out this way for not implemented methods. Instead, each platform should override them to provide the context they want. Fixes #82439. (cherry picked from commit 0a10f09ce4321695940a626eef9c64b36f599193)
This commit is contained in:
parent
808103890a
commit
b44ee23cee
@ -626,7 +626,7 @@ void OS::swap_buffers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String OS::get_unique_id() const {
|
String OS::get_unique_id() const {
|
||||||
ERR_FAIL_V("");
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int OS::get_processor_count() const {
|
int OS::get_processor_count() const {
|
||||||
|
@ -579,7 +579,7 @@
|
|||||||
<description>
|
<description>
|
||||||
Returns a string that is unique to the device.
|
Returns a string that is unique to the device.
|
||||||
[b]Note:[/b] This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [method get_unique_id] for security purposes.
|
[b]Note:[/b] This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [method get_unique_id] for security purposes.
|
||||||
[b]Note:[/b] Returns an empty string on HTML5, as this method isn't implemented on this platform yet.
|
[b]Note:[/b] Returns an empty string and prints an error on HTML5, as this method cannot be implemented on this platform.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_unix_time" qualifiers="const">
|
<method name="get_unix_time" qualifiers="const">
|
||||||
|
@ -893,6 +893,10 @@ int OS_JavaScript::get_processor_count() const {
|
|||||||
return pandemonium_js_os_hw_concurrency_get();
|
return pandemonium_js_os_hw_concurrency_get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String OS_JavaScript::get_unique_id() const {
|
||||||
|
ERR_FAIL_V_MSG("", "OS::get_unique_id() is not available on the HTML5 platform.");
|
||||||
|
}
|
||||||
|
|
||||||
bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
|
bool OS_JavaScript::_check_internal_feature_support(const String &p_feature) {
|
||||||
if (p_feature == "HTML5" || p_feature == "web") {
|
if (p_feature == "HTML5" || p_feature == "web") {
|
||||||
return true;
|
return true;
|
||||||
|
@ -179,6 +179,7 @@ public:
|
|||||||
virtual Error kill(const ProcessID &p_pid);
|
virtual Error kill(const ProcessID &p_pid);
|
||||||
virtual int get_process_id() const;
|
virtual int get_process_id() const;
|
||||||
int get_processor_count() const;
|
int get_processor_count() const;
|
||||||
|
String get_unique_id() const;
|
||||||
|
|
||||||
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
|
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
|
||||||
virtual void set_window_title(const String &p_title);
|
virtual void set_window_title(const String &p_title);
|
||||||
|
Loading…
Reference in New Issue
Block a user