SDL and emscripten functions move to main.