summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-01-01 13:59:13 -0200
committerGeorge Marques <george@gmarqu.es>2018-01-01 13:59:14 -0200
commit2a023a425dd73ee476aa78fc6a544ea3bfbc010b (patch)
tree64cdf68eeaf3816f60923addf43d23f5e30d167c /modules
parentabf416f922cb47b32ddc391eb58f1a8572579665 (diff)
Make GDNative DLLs work on UWP
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/gdnative.cpp3
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index 9c0041cbe0..51dbba7d28 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -130,6 +130,9 @@ bool GDNative::initialize() {
// we should pass library name to dlopen(). The library name is flattened
// during export.
String path = lib_path.get_file();
+#elif defined(UWP_ENABLED)
+ // On UWP we use a relative path from the app
+ String path = lib_path.replace("res://", "");
#else
String path = ProjectSettings::get_singleton()->globalize_path(lib_path);
#endif
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp
index 1e638ab702..22fb058851 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.cpp
+++ b/modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -299,8 +299,8 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
NativePlatformConfig platform_uwp;
platform_uwp.name = "Windows Universal";
platform_uwp.entries.push_back("arm");
- platform_uwp.entries.push_back("x86");
- platform_uwp.entries.push_back("x64");
+ platform_uwp.entries.push_back("32");
+ platform_uwp.entries.push_back("64");
platform_uwp.library_extension = "*.dll";
platforms["UWP"] = platform_uwp;