(Emscripten) Refactor platform_emscripten.c - ToadKing - test
if this still works