Hey Mark! On Wed, Jul 9, 2014 at 3:54 AM, Mark Callow <[email protected]> wrote: > On 09/07/2014 13:17, Mark Callow wrote: > > On 09/07/2014 11:23, Mark Callow wrote: > > As for the headers I compiled using the headers from the SDL 2.0.3 source > release. Is your include/SDL2 different? > > The header files are different though I only see 1 instance of > defined(EMSCRIPTEN). A lot of the differences seem related to the 2.0.3 > headers including WinRT support. But your emscripten/system/include/SDL2 > includes some files not found in 2.0.3. Since you changed both of the items > in SDL_revision.h without leaving any trace of the original values, I cannot > tell whether your headers pre- or post-date the 2.0.3 headers. > > I'll try compiling with your headers after lunch. > > Got it working. It is nothing to do with the headers. There is no difference > in result between SDL 2.0.3 headers or Sathya's. Not surprising since the > app just calls a few SDL functions and passes a few enums. > > The problem was that the entry to my native OpenGL ES application is > SDL_main(). SDL either provides a main() which calls SDL_main() or a define > that changes SDL_main() to main() depending on the platform. Neither of > those things are happening in this case with either set of headers so there > is no main() and so Module['_main'] is empty in the compiled JS. I have not > yet investigated exactly why. Once I figure it out I'll file an issue. The > upstreamed code needs to ensure SDL_main can be used just like in native. > > If I change the name to main() everything works. It even works in IE11!!!!!
This is so awesome! I'm glad you got it to work :) Feel free to file issues on the github repo if you find anything broken/want other features. Thanks for trying and testing this out! --Sathya > It took me half a day to find this due to issue 2133, which confuses the > debuggers about line numbers, additional issues with both Firefox debuggers > and the obscure connection between loading the document and getting to the > code in the generated .js file. > > Problems with the FF debuggers are: > > The default debugger fails to see MyApp.js. It only shows MyApp.html. > Firebug's script runs for so long that the stop/continue pop-up appears. > Even if you click stop, it keeps running. > > It is possible these are related to issue 2133 as well. > > Regards > > -Mark > > -- > 注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 > 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます. > > NOTE: This electronic mail message may contain confidential and privileged > information from HI Corporation. If you are not the intended recipient, any > disclosure, photocopying, distribution or use of the contents of the > received information is prohibited. If you have received this e-mail in > error, please notify the sender immediately and permanently delete this > message and all related copies. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
