libretro-mirrors / scummvm

ScummVM with libretro backend.
http://www.scummvm.org/
GNU General Public License v2.0
21 stars 30 forks source link

Add build-time option to run the emulator in a thread instead of libco + add OpenDingux target #172

Closed jdgleaver closed 3 years ago

jdgleaver commented 3 years ago

At present, the emulation code of ScummVM is wrapped with libco. This PR adds a new compile-time option (USE_LIBCO) which can be disabled to instead use a pthreads-based mechanism. It is implemented in exactly the same fashion as https://github.com/libretro/gpsp/pull/81.

The purpose of this is twofold:

1) libco is fine, but can cause strange and unpredictable behaviour when used with code not specifically designed around it. Setting USE_LIBCO = 0 can therefore be useful for debugging.

2) We simply don't have working libco implementations for all platforms. A notable example is OpenDingux - attempting to use libco on OpenDingux causes the instant death of the process...

Since we now have a working libco alternative, it has been possible to add an OpenDingux target to the makefile + .gitlab-ci.yml file. For the OpenDingux build:

All non-high-resolution games seem to run full speed.

Note: USE_LIBCO is set to 1 for all builds apart from OpenDingux