Pause and resume on web version of player

Hello!

I’m using js/wasm version of EasyRPG Player on my webpage.

Sometimes I need to pause game and resume it later.
Example: pause when user opened another tab in browser and resume when user is switched to my webpage again.

How can I pause player?

I can edit player sources and recompile it if needed.

You need to add another event here:

Check for SDL_WINDOWEVENT_FOCUS_GAINED instead of the “not-Emscripten” part.

2 Likes