From 44020adfc3486c2cebb1eb2288a7d8ad6db6f0b5 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Fri, 23 Jun 2017 15:22:40 -0700 Subject: [PATCH] Emscripten fixes --- include.xml | 38 ++++++++++++---------- lime/_backend/native/NativeAudioSource.hx | 3 ++ lime/tools/platforms/EmscriptenPlatform.hx | 11 +++++++ project/Build.xml | 5 +-- 4 files changed, 38 insertions(+), 19 deletions(-) diff --git a/include.xml b/include.xml index 7e920c584..ad4d40e8b 100644 --- a/include.xml +++ b/include.xml @@ -5,18 +5,15 @@ - - + + - - + + + + - - - - - - + @@ -64,16 +61,23 @@ - - + + - - - - - + + + + + + +
+ + + + +
diff --git a/lime/_backend/native/NativeAudioSource.hx b/lime/_backend/native/NativeAudioSource.hx index cfa921405..1479a4fc9 100644 --- a/lime/_backend/native/NativeAudioSource.hx +++ b/lime/_backend/native/NativeAudioSource.hx @@ -508,10 +508,13 @@ class NativeAudioSource { public function getPosition ():Vector4 { + #if !emscripten var value = AL.getSource3f (handle, AL.POSITION); position.x = value[0]; position.y = value[1]; position.z = value[2]; + #end + return position; } diff --git a/lime/tools/platforms/EmscriptenPlatform.hx b/lime/tools/platforms/EmscriptenPlatform.hx index 13d4fef6a..1ed8aafab 100644 --- a/lime/tools/platforms/EmscriptenPlatform.hx +++ b/lime/tools/platforms/EmscriptenPlatform.hx @@ -90,9 +90,20 @@ class EmscriptenPlatform extends PlatformTarget { args.push ("-s"); args.push ("NO_EXIT_RUNTIME=1"); + args.push ("-s"); args.push ("USE_SDL=2"); + for (dependency in project.dependencies) { + + if (dependency.name != "") { + + args.push ("-l" + dependency.name); + + } + + } + if (project.targetFlags.exists ("final")) { args.push ("-s"); diff --git a/project/Build.xml b/project/Build.xml index d8f15b729..979604e8c 100644 --- a/project/Build.xml +++ b/project/Build.xml @@ -138,8 +138,8 @@ - - + + @@ -437,6 +437,7 @@ +