From 73049d115e190b8c356f0689a9079c3c73cc5765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 17 Nov 2017 15:25:22 +0100 Subject: Rename OS::get_data_dir to OS::get_user_data_dir Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring. --- core/bind/core_bind.cpp | 6 +++--- core/bind/core_bind.h | 2 +- core/os/dir_access.cpp | 4 ++-- core/os/file_access.cpp | 2 +- core/os/os.cpp | 6 +++--- core/os/os.h | 4 ++-- core/project_settings.cpp | 2 +- doc/classes/OS.xml | 4 ++-- drivers/unix/os_unix.cpp | 2 +- drivers/unix/os_unix.h | 2 +- modules/enet/networked_multiplayer_enet.cpp | 2 +- modules/mono/godotsharp_dirs.cpp | 2 +- platform/android/java_glue.cpp | 4 ++-- platform/android/os_android.cpp | 11 +++++------ platform/android/os_android.h | 8 ++++---- platform/iphone/os_iphone.cpp | 6 +++--- platform/iphone/os_iphone.h | 2 +- platform/javascript/os_javascript.cpp | 10 +++++----- platform/javascript/os_javascript.h | 8 ++++---- platform/osx/os_osx.mm | 2 +- platform/server/os_server.cpp | 2 +- platform/uwp/os_uwp.cpp | 5 +++-- platform/uwp/os_uwp.h | 2 +- platform/windows/os_windows.cpp | 4 ++-- platform/windows/os_windows.h | 2 +- platform/x11/os_x11.cpp | 2 +- 26 files changed, 53 insertions(+), 53 deletions(-) diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index e1adb250e7..999befaf67 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -888,9 +888,9 @@ void _OS::dump_resources_to_file(const String &p_file) { OS::get_singleton()->dump_resources_to_file(p_file.utf8().get_data()); } -String _OS::get_data_dir() const { +String _OS::get_user_data_dir() const { - return OS::get_singleton()->get_data_dir(); + return OS::get_singleton()->get_user_data_dir(); }; Error _OS::native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track) { @@ -1088,7 +1088,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_static_memory_peak_usage"), &_OS::get_static_memory_peak_usage); ClassDB::bind_method(D_METHOD("get_dynamic_memory_usage"), &_OS::get_dynamic_memory_usage); - ClassDB::bind_method(D_METHOD("get_data_dir"), &_OS::get_data_dir); + ClassDB::bind_method(D_METHOD("get_user_data_dir"), &_OS::get_user_data_dir); ClassDB::bind_method(D_METHOD("get_system_dir", "dir"), &_OS::get_system_dir); ClassDB::bind_method(D_METHOD("get_unique_id"), &_OS::get_unique_id); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 9be8895443..8163b08d76 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -297,7 +297,7 @@ public: String get_system_dir(SystemDir p_dir) const; - String get_data_dir() const; + String get_user_data_dir() const; void alert(const String &p_alert, const String &p_title = "ALERT!"); diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 0875f78478..35e4443f2a 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -38,7 +38,7 @@ String DirAccess::_get_root_path() const { switch (_access_type) { case ACCESS_RESOURCES: return ProjectSettings::get_singleton()->get_resource_path(); - case ACCESS_USERDATA: return OS::get_singleton()->get_data_dir(); + case ACCESS_USERDATA: return OS::get_singleton()->get_user_data_dir(); default: return ""; } @@ -217,7 +217,7 @@ String DirAccess::fix_path(String p_path) const { if (p_path.begins_with("user://")) { - String data_dir = OS::get_singleton()->get_data_dir(); + String data_dir = OS::get_singleton()->get_user_data_dir(); if (data_dir != "") { return p_path.replace_first("user:/", data_dir); diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index fcb3b58fed..5fdd2b9135 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -152,7 +152,7 @@ String FileAccess::fix_path(const String &p_path) const { if (r_path.begins_with("user://")) { - String data_dir = OS::get_singleton()->get_data_dir(); + String data_dir = OS::get_singleton()->get_user_data_dir(); if (data_dir != "") { return r_path.replace("user:/", data_dir); diff --git a/core/os/os.cpp b/core/os/os.cpp index eb5d5be33d..ea0f5de8bd 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -281,7 +281,7 @@ String OS::get_safe_application_name() const { return an; } -String OS::get_data_dir() const { +String OS::get_user_data_dir() const { return "."; }; @@ -374,9 +374,9 @@ OS::ScreenOrientation OS::get_screen_orientation() const { return (OS::ScreenOrientation)_orientation; } -void OS::_ensure_data_dir() { +void OS::_ensure_user_data_dir() { - String dd = get_data_dir(); + String dd = get_user_data_dir(); DirAccess *da = DirAccess::open(dd); if (da) { memdelete(da); diff --git a/core/os/os.h b/core/os/os.h index faecdb0e07..a421833e49 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -124,7 +124,7 @@ protected: virtual void set_cmdline(const char *p_execpath, const List &p_args); - void _ensure_data_dir(); + void _ensure_user_data_dir(); virtual bool _check_internal_feature_support(const String &p_feature) = 0; public: @@ -334,7 +334,7 @@ public: virtual String get_locale() const; String get_safe_application_name() const; - virtual String get_data_dir() const; + virtual String get_user_data_dir() const; virtual String get_resource_dir() const; virtual Error move_to_trash(const String &p_path) { return FAILED; } diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 65a6f2b83c..361464ee1f 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -116,7 +116,7 @@ String ProjectSettings::globalize_path(const String &p_path) const { return p_path.replace("res://", ""); } else if (p_path.begins_with("user://")) { - String data_dir = OS::get_singleton()->get_data_dir(); + String data_dir = OS::get_singleton()->get_user_data_dir(); if (data_dir != "") { return p_path.replace("user:/", data_dir); diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index db70b99de4..8f82040eca 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -127,11 +127,11 @@ Returns the current screen index (0 padded). - + - Returns the absolute directory path of user data path([user://]). + Returns the absolute directory path where user data is written ([code]user://[/code]). diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 729abd57ef..e67de16ae5 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -454,7 +454,7 @@ int OS_Unix::get_processor_count() const { return sysconf(_SC_NPROCESSORS_CONF); } -String OS_Unix::get_data_dir() const { +String OS_Unix::get_user_data_dir() const { String an = get_safe_application_name(); if (an != "") { diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 82c7dee3b9..ad3c62d737 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -110,7 +110,7 @@ public: virtual String get_installed_templates_path() const; virtual String get_executable_path() const; - virtual String get_data_dir() const; + virtual String get_user_data_dir() const; //virtual void run( MainLoop * p_main_loop ); }; diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index c50886ad3c..1e18ec0d18 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -505,7 +505,7 @@ uint32_t NetworkedMultiplayerENet::_gen_unique_id() const { hash = hash_djb2_one_32( (uint32_t)OS::get_singleton()->get_unix_time(), hash); hash = hash_djb2_one_32( - (uint32_t)OS::get_singleton()->get_data_dir().hash64(), hash); + (uint32_t)OS::get_singleton()->get_user_data_dir().hash64(), hash); /* hash = hash_djb2_one_32( (uint32_t)OS::get_singleton()->get_unique_id().hash64(), hash ); diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp index 7cc2168b70..268db4804e 100644 --- a/modules/mono/godotsharp_dirs.cpp +++ b/modules/mono/godotsharp_dirs.cpp @@ -80,7 +80,7 @@ String _get_mono_user_dir() { return settings_path.plus_file("mono"); } #else - return OS::get_singleton()->get_data_dir().plus_file("mono"); + return OS::get_singleton()->get_user_data_dir().plus_file("mono"); #endif } diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 90144d9b4d..40dfe6d909 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -647,7 +647,7 @@ static int _open_uri(const String &p_uri) { return env->CallIntMethod(godot_io, _openURI, jStr); } -static String _get_data_dir() { +static String _get_user_data_dir() { JNIEnv *env = ThreadAndroid::get_env(); jstring s = (jstring)env->CallObjectMethod(godot_io, _getDataDir); @@ -825,7 +825,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en AudioDriverAndroid::setup(gob); } - os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _get_vk_height, _set_screen_orient, _get_unique_id, _get_system_dir, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, p_use_apk_expansion); + os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_user_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _get_vk_height, _set_screen_orient, _get_unique_id, _get_system_dir, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, p_use_apk_expansion); os_android->set_need_reload_hooks(p_need_reload_hook); char wd[500]; diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 2578bd6d96..d5ccf76631 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -612,13 +612,13 @@ void OS_Android::set_need_reload_hooks(bool p_needs_them) { use_reload_hooks = p_needs_them; } -String OS_Android::get_data_dir() const { +String OS_Android::get_user_data_dir() const { if (data_dir_cache != String()) return data_dir_cache; - if (get_data_dir_func) { - String data_dir = get_data_dir_func(); + if (get_user_data_dir_func) { + String data_dir = get_user_data_dir_func(); //store current dir char real_current_dir_name[2048]; @@ -641,7 +641,6 @@ String OS_Android::get_data_dir() const { } return "."; - //return Engine::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir"); } void OS_Android::set_screen_orientation(ScreenOrientation p_orientation) { @@ -709,7 +708,7 @@ bool OS_Android::_check_internal_feature_support(const String &p_feature) { return p_feature == "mobile" || p_feature == "etc" || p_feature == "etc2"; //TODO support etc2 only if GLES3 driver is selected } -OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion) { +OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetUserDataDirFunc p_get_user_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion) { use_apk_expansion = p_use_apk_expansion; default_videomode.width = 800; @@ -725,7 +724,7 @@ OS_Android::OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURI use_gl2 = false; open_uri_func = p_open_uri_func; - get_data_dir_func = p_get_data_dir_func; + get_user_data_dir_func = p_get_user_data_dir_func; get_locale_func = p_get_locale_func; get_model_func = p_get_model_func; get_screen_dpi_func = p_get_screen_dpi_func; diff --git a/platform/android/os_android.h b/platform/android/os_android.h index 750afa7a14..d25f60d540 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -48,7 +48,7 @@ typedef void (*GFXInitFunc)(void *ud, bool gl2); typedef int (*OpenURIFunc)(const String &); -typedef String (*GetDataDirFunc)(); +typedef String (*GetUserDataDirFunc)(); typedef String (*GetLocaleFunc)(); typedef String (*GetModelFunc)(); typedef int (*GetScreenDPIFunc)(); @@ -116,7 +116,7 @@ private: MainLoop *main_loop; OpenURIFunc open_uri_func; - GetDataDirFunc get_data_dir_func; + GetUserDataDirFunc get_user_data_dir_func; GetLocaleFunc get_locale_func; GetModelFunc get_model_func; GetScreenDPIFunc get_screen_dpi_func; @@ -208,7 +208,7 @@ public: virtual void set_screen_orientation(ScreenOrientation p_orientation); virtual Error shell_open(String p_uri); - virtual String get_data_dir() const; + virtual String get_user_data_dir() const; virtual String get_resource_dir() const; virtual String get_locale() const; virtual String get_model_name() const; @@ -237,7 +237,7 @@ public: void joy_connection_changed(int p_device, bool p_connected, String p_name); virtual bool _check_internal_feature_support(const String &p_feature); - OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion); + OS_Android(GFXInitFunc p_gfx_init_func, void *p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetUserDataDirFunc p_get_user_data_dir_func, GetLocaleFunc p_get_locale_func, GetModelFunc p_get_model_func, GetScreenDPIFunc p_get_screen_dpi_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, VirtualKeyboardHeightFunc p_vk_height_func, SetScreenOrientationFunc p_screen_orient, GetUniqueIDFunc p_get_unique_id, GetSystemDirFunc p_get_sdir_func, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func, SetKeepScreenOnFunc p_set_keep_screen_on_func, AlertFunc p_alert_func, bool p_use_apk_expansion); ~OS_Android(); }; diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp index d0865a35b9..124b92fedd 100644 --- a/platform/iphone/os_iphone.cpp +++ b/platform/iphone/os_iphone.cpp @@ -470,7 +470,7 @@ void OSIPhone::set_cursor_shape(CursorShape p_shape){ }; -String OSIPhone::get_data_dir() const { +String OSIPhone::get_user_data_dir() const { return data_dir; }; @@ -509,7 +509,7 @@ Error OSIPhone::native_video_play(String p_path, float p_volume, String p_audio_ FileAccess *f = FileAccess::open(p_path, FileAccess::READ); bool exists = f && f->is_open(); - String tempFile = get_data_dir(); + String tempFile = get_user_data_dir(); if (!exists) return FAILED; @@ -521,7 +521,7 @@ Error OSIPhone::native_video_play(String p_path, float p_volume, String p_audio_ p_path = p_path.replace("res:/", ProjectSettings::get_singleton()->get_resource_path()); } } else if (p_path.begins_with("user://")) - p_path = p_path.replace("user:/", get_data_dir()); + p_path = p_path.replace("user:/", get_user_data_dir()); memdelete(f); diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h index 6627fddf08..433228b599 100644 --- a/platform/iphone/os_iphone.h +++ b/platform/iphone/os_iphone.h @@ -178,7 +178,7 @@ public: Error shell_open(String p_uri); - String get_data_dir() const; + String get_user_data_dir() const; void set_locale(String p_locale); String get_locale() const; diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 77d81aec5d..6f73326f65 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -889,11 +889,11 @@ String OS_JavaScript::get_resource_dir() const { return "/"; //javascript has it's own filesystem for resources inside the APK } -String OS_JavaScript::get_data_dir() const { +String OS_JavaScript::get_user_data_dir() const { /* - if (get_data_dir_func) - return get_data_dir_func(); + if (get_user_data_dir_func) + return get_user_data_dir_func(); */ return "/userfs"; }; @@ -993,7 +993,7 @@ bool OS_JavaScript::is_userfs_persistent() const { return idbfs_available; } -OS_JavaScript::OS_JavaScript(const char *p_execpath, GetDataDirFunc p_get_data_dir_func) { +OS_JavaScript::OS_JavaScript(const char *p_execpath, GetUserDataDirFunc p_get_user_data_dir_func) { set_cmdline(p_execpath, get_cmdline_args()); main_loop = NULL; gl_extensions = NULL; @@ -1001,7 +1001,7 @@ OS_JavaScript::OS_JavaScript(const char *p_execpath, GetDataDirFunc p_get_data_d soft_fs_enabled = false; canvas_size_adjustment_requested = false; - get_data_dir_func = p_get_data_dir_func; + get_user_data_dir_func = p_get_user_data_dir_func; FileAccessUnix::close_notification_func = _close_notification_funcs; idbfs_available = false; diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index f478f95dd2..19f47b72b2 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -42,7 +42,7 @@ #include -typedef String (*GetDataDirFunc)(); +typedef String (*GetUserDataDirFunc)(); class OS_JavaScript : public OS_Unix { @@ -63,7 +63,7 @@ class OS_JavaScript : public OS_Unix { CursorShape cursor_shape; MainLoop *main_loop; - GetDataDirFunc get_data_dir_func; + GetUserDataDirFunc get_user_data_dir_func; PowerJavascript *power_manager; @@ -146,7 +146,7 @@ public: void set_opengl_extensions(const char *p_gl_extensions); virtual Error shell_open(String p_uri); - virtual String get_data_dir() const; + virtual String get_user_data_dir() const; String get_executable_path() const; virtual String get_resource_dir() const; @@ -165,7 +165,7 @@ public: void set_idbfs_available(bool p_idbfs_available); - OS_JavaScript(const char *p_execpath, GetDataDirFunc p_get_data_dir_func); + OS_JavaScript(const char *p_execpath, GetUserDataDirFunc p_get_user_data_dir_func); ~OS_JavaScript(); }; diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 2e0e2620be..49d94da9e1 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1095,7 +1095,7 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au power_manager = memnew(power_osx); - _ensure_data_dir(); + _ensure_user_data_dir(); restore_rect = Rect2(get_window_position(), get_window_size()); } diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index ca73f610e4..5b852af738 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -73,7 +73,7 @@ void OS_Server::initialize(const VideoMode &p_desired, int p_video_driver, int p input = memnew(InputDefault); - _ensure_data_dir(); + _ensure_user_data_dir(); } void OS_Server::finalize() { diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp index acb0ba4bca..c9e17872c6 100644 --- a/platform/uwp/os_uwp.cpp +++ b/platform/uwp/os_uwp.cpp @@ -28,6 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "os_uwp.h" + #include "drivers/gles3/rasterizer_gles3.h" #include "drivers/unix/ip_unix.h" #include "drivers/windows/dir_access_windows.h" @@ -298,7 +299,7 @@ void OSUWP::initialize(const VideoMode &p_desired, int p_video_driver, int p_aud ref new TypedEventHandler(managed_object, &ManagedType::on_gyroscope_reading_changed); } - _ensure_data_dir(); + _ensure_user_data_dir(); if (is_keep_screen_on()) display_request->RequestActive(); @@ -781,7 +782,7 @@ MainLoop *OSUWP::get_main_loop() const { return main_loop; } -String OSUWP::get_data_dir() const { +String OSUWP::get_user_data_dir() const { Windows::Storage::StorageFolder ^ data_folder = Windows::Storage::ApplicationData::Current->LocalFolder; diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index 2931e9b07d..3c52fc29a8 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -226,7 +226,7 @@ public: virtual String get_locale() const; virtual void move_window_to_foreground(); - virtual String get_data_dir() const; + virtual String get_user_data_dir() const; virtual bool _check_internal_feature_support(const String &p_feature); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 0f62dbb9e8..8c290127a0 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1090,7 +1090,7 @@ void OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int //RegisterTouchWindow(hWnd, 0); // Windows 7 - _ensure_data_dir(); + _ensure_user_data_dir(); DragAcceptFiles(hWnd, true); @@ -2167,7 +2167,7 @@ String OS_Windows::get_system_dir(SystemDir p_dir) const { ERR_FAIL_COND_V(res != S_OK, String()); return String(szPath); } -String OS_Windows::get_data_dir() const { +String OS_Windows::get_user_data_dir() const { String an = get_safe_application_name(); if (an != "") { diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index fbd60e5f0d..f3b8f0e5fd 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -253,7 +253,7 @@ public: virtual void enable_for_stealing_focus(ProcessID pid); virtual void move_window_to_foreground(); - virtual String get_data_dir() const; + virtual String get_user_data_dir() const; virtual String get_system_dir(SystemDir p_dir) const; virtual void release_rendering_thread(); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index f018145d82..412e22b5f7 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -464,7 +464,7 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au #ifdef JOYDEV_ENABLED joypad = memnew(JoypadLinux(input)); #endif - _ensure_data_dir(); + _ensure_user_data_dir(); power_manager = memnew(PowerX11); } -- cgit v1.2.3