diff --git a/lime/AudioHandler.hx b/lime/AudioHandler.hx index 7793d17f2..ef260229f 100644 --- a/lime/AudioHandler.hx +++ b/lime/AudioHandler.hx @@ -74,7 +74,9 @@ class AudioHandler { @:noCompletion public function shutdown() { - audio_thread_running = false; + #if (!audio_thread_disabled && lime_native) + audio_thread_running = false; + #end //(!audio_thread_disabled && lime_native) } diff --git a/templates/html5/haxe/ApplicationMain.hx b/templates/html5/haxe/ApplicationMain.hx index 8ac278a34..7088df2b8 100755 --- a/templates/html5/haxe/ApplicationMain.hx +++ b/templates/html5/haxe/ApplicationMain.hx @@ -1,38 +1,39 @@ #if lime_html5 - import ::APP_MAIN_PACKAGE::::APP_MAIN_CLASS::; - import lime.Lime; + import ::APP_MAIN_PACKAGE::::APP_MAIN_CLASS::; + import lime.Lime; - class ApplicationMain { - - public static function main () { + class ApplicationMain { + + public static function main () { + //Create the game class, give it the runtime + var _main_ = Type.createInstance (::APP_MAIN::, []); + //Create an instance of lime + var _lime = new Lime(); - - //Create the game class, give it the runtime - var _main_ = Type.createInstance (::APP_MAIN::, []); - //Create an instance of lime - var _lime = new Lime(); + //Create the config from the project.nmml info + var config : LimeConfig = { + host : _main_, + fullscreen : ::WIN_FULLSCREEN::, + resizable : ::WIN_RESIZABLE::, + borderless : ::WIN_BORDERLESS::, + antialiasing : Std.int(::WIN_ANTIALIASING::), + stencil_buffer : ::WIN_STENCIL_BUFFER::, + depth_buffer : ::WIN_DEPTH_BUFFER::, + vsync : ::WIN_VSYNC::, + fps : Std.int(::WIN_FPS::), + width : Std.int(::WIN_WIDTH::), + height : Std.int(::WIN_HEIGHT::), + orientation : "::WIN_ORIENTATION::", + title : "::APP_TITLE::", + }; - //Create the config from the project.nmml info - var config = { - fullscreen : ::WIN_FULLSCREEN::, - resizable : ::WIN_RESIZABLE::, - borderless : ::WIN_BORDERLESS::, - antialiasing : ::WIN_ANTIALIASING::, - stencil_buffer : ::WIN_STENCIL_BUFFER::, - depth_buffer : ::WIN_DEPTH_BUFFER::, - vsync : ::WIN_VSYNC::, - width : ::WIN_WIDTH::, - height : ::WIN_HEIGHT::, - title : "::APP_TITLE::" - }; - - //Start up - _lime.init( _main_, config ); - - } //main - } //ApplicationMain + //Start up + _lime.init( _main_, config ); + + } //main + } //ApplicationMain #end //lime_html5