Browse Source

MesssageService extern function for emscripten communication

undefined
Benjamin ‘Touky’ Huet Sam Hocevar <sam@hocevar.net> 11 years ago
parent
commit
88e99dc9fd
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      src/messageservice.cpp

+ 13
- 0
src/messageservice.cpp View File

@@ -22,6 +22,19 @@
namespace lol
{

// This is needed to map MessageService::Send() to the JS when building the HTML.
#if EMSCRIPTEN
extern "C"
{
bool C_Send(int id, const char* message)
{
return MessageService::Send(id, message);
}
//NOT IMPLEMENTED
//bool C_FetchFirst(int id, String& message);
}
#endif //EMSCRIPTEN

/*
* The global g_renderer object, initialised by Video::Init
*/


Loading…
Cancel
Save