summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/net_socket_posix.cpp4
-rw-r--r--drivers/unix/os_unix.cpp12
-rw-r--r--drivers/unix/os_unix.h2
-rw-r--r--drivers/unix/thread_posix.cpp4
4 files changed, 14 insertions, 8 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp
index 72ae609fb4..c6b327eeee 100644
--- a/drivers/unix/net_socket_posix.cpp
+++ b/drivers/unix/net_socket_posix.cpp
@@ -179,8 +179,8 @@ NetSocketPosix::~NetSocketPosix() {
close();
}
-// Silent a warning reported in #27594
-
+// Silence a warning reported in GH-27594.
+// EAGAIN and EWOULDBLOCK have the same value on most platforms, but it's not guaranteed.
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlogical-op"
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 10d65b83db..b02a100784 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -145,6 +145,10 @@ void OS_Unix::finalize_core() {
NetSocketPosix::cleanup();
}
+Vector<String> OS_Unix::get_video_adapter_driver_info() const {
+ return Vector<String>();
+}
+
String OS_Unix::get_stdin_string(bool p_block) {
if (p_block) {
char buff[1024];
@@ -501,11 +505,11 @@ bool OS_Unix::set_environment(const String &p_var, const String &p_value) const
}
String OS_Unix::get_user_data_dir() const {
- String appname = get_safe_dir_name(ProjectSettings::get_singleton()->get("application/config/name"));
+ String appname = get_safe_dir_name(GLOBAL_GET("application/config/name"));
if (!appname.is_empty()) {
- bool use_custom_dir = ProjectSettings::get_singleton()->get("application/config/use_custom_user_dir");
+ bool use_custom_dir = GLOBAL_GET("application/config/use_custom_user_dir");
if (use_custom_dir) {
- String custom_dir = get_safe_dir_name(ProjectSettings::get_singleton()->get("application/config/custom_user_dir_name"), true);
+ String custom_dir = get_safe_dir_name(GLOBAL_GET("application/config/custom_user_dir_name"), true);
if (custom_dir.is_empty()) {
custom_dir = appname;
}
@@ -561,7 +565,7 @@ String OS_Unix::get_executable_path() const {
WARN_PRINT("MAXPATHLEN is too small");
}
- String path(resolved_path);
+ String path = String::utf8(resolved_path);
delete[] resolved_path;
return path;
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index fce962e32c..ce06a52a95 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -51,6 +51,8 @@ protected:
public:
OS_Unix();
+ virtual Vector<String> get_video_adapter_driver_info() const override;
+
virtual String get_stdin_string(bool p_block) override;
virtual Error get_entropy(uint8_t *r_buffer, int p_bytes) override;
diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp
index f6adbee108..5154feb478 100644
--- a/drivers/unix/thread_posix.cpp
+++ b/drivers/unix/thread_posix.cpp
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#if defined(UNIX_ENABLED) || defined(PTHREAD_ENABLED)
+#if defined(UNIX_ENABLED)
#include "thread_posix.h"
@@ -73,4 +73,4 @@ void init_thread_posix() {
Thread::_set_platform_functions({ .set_name = set_name });
}
-#endif // UNIX_ENABLED || PTHREAD_ENABLED
+#endif // UNIX_ENABLED