Add minimal emscripten support
This commit is contained in:
1 parent
f869bffe97
commit
f41bd37fde
4 files changed
+100
-3
No files matched your search
@@ -31,6 +31,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#ifndef DEDICATED
|
||||
#ifdef USE_LOCAL_HEADERS
|
||||
# include "SDL.h"
|
||||
@@ -863,10 +867,14 @@ int main( int argc, char **argv )
|
||||
signal( SIGTERM, Sys_SigHandler );
|
||||
signal( SIGINT, Sys_SigHandler );
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_set_main_loop( Com_Frame, 0, 1 );
|
||||
#else
|
||||
while( 1 )
|
||||
{
|
||||
Com_Frame( );
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user