Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_master
This commit is contained in:
commit
a7ba227631
18 changed files with 67 additions and 34 deletions
|
|
@ -35,7 +35,9 @@
|
|||
#include "core/object/method_bind.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
const char *NativeExtension::EXTENSION_LIST_CONFIG_FILE = "res://.godot/extension_list.cfg";
|
||||
String NativeExtension::get_extension_list_config_file() {
|
||||
return ProjectSettings::get_singleton()->get_project_data_path().plus_file("extension_list.cfg");
|
||||
}
|
||||
|
||||
class NativeExtensionMethodBind : public MethodBind {
|
||||
GDNativeExtensionClassMethodCall call_func;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ protected:
|
|||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
static const char *EXTENSION_LIST_CONFIG_FILE;
|
||||
static String get_extension_list_config_file();
|
||||
|
||||
Error open_library(const String &p_path, const String &p_entry_symbol);
|
||||
void close_library();
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void NativeExtensionManager::deinitialize_extensions(NativeExtension::Initializa
|
|||
}
|
||||
|
||||
void NativeExtensionManager::load_extensions() {
|
||||
FileAccessRef f = FileAccess::open(NativeExtension::EXTENSION_LIST_CONFIG_FILE, FileAccess::READ);
|
||||
FileAccessRef f = FileAccess::open(NativeExtension::get_extension_list_config_file(), FileAccess::READ);
|
||||
while (f && !f->eof_reached()) {
|
||||
String s = f->get_line().strip_edges();
|
||||
if (s != String()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue