diff options
author | Thomas Herzog <thomas.herzog@mail.com> | 2017-07-24 22:48:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 22:48:04 +0200 |
commit | 4b3fd599515bbfc459946e535a499035b6bfa217 (patch) | |
tree | fc7cb0f4423079415280555fe11e20e89f1ecb5b | |
parent | 0a74fb625e55743e32aa0977191d936e94df235c (diff) | |
parent | 5e1abaf348cf301d22752062625af18ba9f0f397 (diff) |
Merge pull request #9821 from karroffel/nativescript-doublefree
[GDNative] basic OS detection
-rw-r--r-- | modules/gdnative/gdnative.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 65bfbb0ff7..e810c33f1c 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -65,8 +65,17 @@ String GDNativeLibrary::platform_lib_ext[NUM_PLATFORMS] = { "wasm" }; -// TODO(karroffel): make this actually do something lol. -GDNativeLibrary::Platform GDNativeLibrary::current_platform = X11_64BIT; +// TODO(karroffel): make this actually do the right thing. +GDNativeLibrary::Platform GDNativeLibrary::current_platform = +#if defined(X11_ENABLED) + X11_64BIT; +#elif defined(WINDOWS_ENABLED) + WINDOWS_64BIT; +#elif defined(OSX_ENABLED) + OSX; +#else + X11_64BIT; // need a sensible default.. +#endif GDNativeLibrary::GDNativeLibrary() : library_paths() { |