emularity icon indicating copy to clipboard operation
emularity copied to clipboard

Is it possible to destroy the emulation process in the canvas?

Open ahtoh68 opened this issue 7 years ago • 4 comments

In TECHNICAL.md has methods that allow you to work with the emulator object.

Once you have an emulator object, there are several methods you can call. start() requestFullScreen() mute() unmute() toggleMute() setSplashColors() others…

I would like to know if there is a method that allows you to stop (destroy) the emulator object? Something like emulator.stop() or emulator.destroi() ...

And by the way. The mute(), unmute(), toggleMute() methods, when using DOSBox, cause the emulator freezes. This can be observed here: https://archive.org/details/GobliiinsDemo

ahtoh68 avatar Feb 08 '18 06:02 ahtoh68

At present there is not. I'm not even sure it's possible to stop a program compiled with Emscripten. I do know that the program is free to call exit like any normal program, and then the Emscripten main loop will stop.

db48x avatar Feb 13 '18 07:02 db48x

Thanks for the answer. On this site this opportunity was realized, but I do not understand how it was done: https://www.myabandonware.com/game/warcraft-ii-tides-of-darkness-2sh/play-2sh Maybe you have ideas...

ahtoh68 avatar Feb 13 '18 09:02 ahtoh68

@ahtoh68, _emscripten_force_exit(1) will help you. Just call this func, when emulator is running, and it will be terminated.

sas1024 avatar Apr 14 '18 20:04 sas1024

@sas1024 Thank you, very good solution of the problem.

ahtoh68 avatar Apr 17 '18 05:04 ahtoh68