|
|
@@ -3,6 +3,7 @@
|
|
|
// https://github.com/AtomicGameEngine/AtomicGameEngine
|
|
|
|
|
|
#include "Precompiled.h"
|
|
|
+#include "../Core/ProcessUtils.h"
|
|
|
#include "../IO/FileSystem.h"
|
|
|
#include "../IO/Log.h"
|
|
|
#include "../Resource/ResourceCache.h"
|
|
|
@@ -235,16 +236,13 @@ void jsapi_init_atomic(JSVM* vm)
|
|
|
// Atomic
|
|
|
duk_get_global_string(ctx, "Atomic");
|
|
|
|
|
|
-#ifdef ATOMIC_PLATFORM_OSX
|
|
|
- duk_push_string(ctx, "Mac");
|
|
|
- duk_put_prop_string(ctx, -2, "platform");
|
|
|
-#elif ATOMIC_PLATFORM_WINDOWS
|
|
|
- duk_push_string(ctx, "Windows");
|
|
|
- duk_put_prop_string(ctx, -2, "platform");
|
|
|
-#elif ATOMIC_PLATFORM_ANDROID
|
|
|
- duk_push_string(ctx, "Android");
|
|
|
+
|
|
|
+ String platform = GetPlatform();
|
|
|
+ if (platform == "Mac OS X")
|
|
|
+ platform = "MacOSX";
|
|
|
+
|
|
|
+ duk_push_string(ctx, platform.CString());
|
|
|
duk_put_prop_string(ctx, -2, "platform");
|
|
|
-#endif
|
|
|
|
|
|
// Node registry
|
|
|
duk_push_global_stash(ctx);
|